Update README.md

This commit is contained in:
Nicolas 2024-08-30 15:52:23 -03:00
parent 23dfe90baa
commit 7f1ed6b489
1 changed files with 22 additions and 6 deletions

View File

@ -229,20 +229,19 @@ Response will be an ordered list from the most relevant to the least relevant.
} }
``` ```
### LLM Extraction (v0) (Beta) ### LLM Extraction (Beta)
Used to extract structured data from scraped pages. Used to extract structured data from scraped pages.
```bash ```bash
curl -X POST https://api.firecrawl.dev/v0/scrape \ curl -X POST https://api.firecrawl.dev/v1/scrape \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Authorization: Bearer YOUR_API_KEY' \
-d '{ -d '{
"url": "https://www.mendable.ai/", "url": "https://www.mendable.ai/",
"extractorOptions": { "formats": ["extract"],
"mode": "llm-extraction", "extract": {
"extractionPrompt": "Based on the information on the page, extract the information from the schema. ", "schema": {
"extractionSchema": {
"type": "object", "type": "object",
"properties": { "properties": {
"company_mission": { "company_mission": {
@ -296,6 +295,23 @@ curl -X POST https://api.firecrawl.dev/v0/scrape \
} }
``` ```
### Extracting without a schema (New)
You can now extract without a schema by just passing a `prompt` to the endpoint. The llm chooses the structure of the data.
```bash
curl -X POST https://api.firecrawl.dev/v1/scrape \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"url": "https://docs.firecrawl.dev/",
"formats": ["extract"],
"extract": {
"prompt": "Extract the company mission from the page."
}
}'
```
### Search (v0) (Beta) ### Search (v0) (Beta)