Scrape and extract structured data with Firecrawl
Firecrawl uses AI to get structured data from web pages in 3 steps:-
Set the Schema (optional):
Define a JSON schema (using OpenAI’s format) to specify the data you want, or just provide a
prompt
if you don’t need a strict schema, along with the webpage URL. - Make the Request: Send your URL and schema to our scrape endpoint using JSON mode. See how here: Scrape Endpoint Documentation
- Get Your Data: Get back clean, structured data matching your schema that you can use right away.
Extract structured data
JSON mode via /scrape
Used to extract structured data from scraped pages.JSON
Structured data without schema
You can also extract without a schema by just passing aprompt
to the endpoint. The llm chooses the structure of the data.
JSON
JSON format options
When using JSON mode, include an object informats
, for example:
formats: [{ type: 'json', schema: { ... }, prompt: '...' }]
Parameters:
schema
: JSON Schema describing the structured output you want.prompt
: Optional prompt to guide extraction (also used for no-schema extraction).