mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
Update README.md
This commit is contained in:
parent
4194525640
commit
86744f6deb
28
README.md
28
README.md
|
@ -318,6 +318,34 @@ curl -X POST https://api.firecrawl.dev/v1/scrape \
|
|||
}'
|
||||
```
|
||||
|
||||
### Intracting with the page with Actions (Cloud-only)
|
||||
|
||||
Firecrawl allows you to perform various actions on a web page before scraping its content. This is particularly useful for interacting with dynamic content, navigating through pages, or accessing content that requires user interaction.
|
||||
|
||||
Here is an example of how to use actions to navigate to google.com, search for Firecrawl, click on the first result, and take a screenshot.
|
||||
|
||||
```bash
|
||||
curl -X POST https://api.firecrawl.dev/v1/scrape \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer YOUR_API_KEY' \
|
||||
-d '{
|
||||
"url": "google.com",
|
||||
"formats": ["markdown"],
|
||||
"actions": [
|
||||
{"type": "wait", "milliseconds": 2000},
|
||||
{"type": "click", "selector": "textarea[title=\"Search\"]"},
|
||||
{"type": "wait", "milliseconds": 2000},
|
||||
{"type": "write", "text": "firecrawl"},
|
||||
{"type": "wait", "milliseconds": 2000},
|
||||
{"type": "press", "key": "ENTER"},
|
||||
{"type": "wait", "milliseconds": 3000},
|
||||
{"type": "click", "selector": "h3"},
|
||||
{"type": "wait", "milliseconds": 3000},
|
||||
{"type": "screenshot"}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
|
||||
### Search (v0) (Beta)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user