SerpApi extract
extractRetrieve content from a public URL, discover site links, or crawl pages via SerpApi, returning Markdown or JSON based on the selected scrape, map, or crawl mode.
Instructions
Extract content from a public http(s) URL, discover site URLs, or crawl pages.
API options go in params: url is required; params.mode is scrape (default), map, or crawl. See serpapi://engines/extract for all options.
Top-level mode controls the response:
complete (default): full JSON.
compact: native Markdown by default.
params.output selects the format and overrides either default:
"md": return native Markdown unchanged in either response mode.
"json": return JSON, with filtering determined by the response mode.
Compact JSON removes metadata. For scrape responses containing markdown, it also keeps only markdown and any error field. include_markdown=false or an explicit json_restrictor skips this extra filtering. Map/crawl and responses without markdown keep their remaining fields. Use complete with output="json" for full JSON.
Crawl max_pages defaults to 10 (maximum 100). Each successfully extracted, uncached page consumes one credit.
Examples: Full scrape JSON: {"params":{"url":"https://example.com"},"mode":"complete"} Scrape Markdown: {"params":{"url":"https://example.com"},"mode":"compact"} Map URLs as JSON: {"params":{"url":"https://example.com","mode":"map"},"mode":"complete"} Crawl pages as Markdown: {"params":{"url":"https://example.com","mode":"crawl","max_pages":2},"mode":"compact"}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | complete | |
| params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |