From 7f1ed6b489330e7d7f3e7060ed5cc15ed4b4df89 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 30 Aug 2024 15:52:23 -0300 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 22a2c12..89ed012 100644 --- a/README.md +++ b/README.md @@ -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. ```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 'Authorization: Bearer YOUR_API_KEY' \ -d '{ "url": "https://www.mendable.ai/", - "extractorOptions": { - "mode": "llm-extraction", - "extractionPrompt": "Based on the information on the page, extract the information from the schema. ", - "extractionSchema": { + "formats": ["extract"], + "extract": { + "schema": { "type": "object", "properties": { "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)