Extract API Reference
2 routes. Base URL https://api.apifor.dev, authenticated with x-api-key. Failed calls are not charged. Overview, limits and sources are on the Web page to markdown API page.
GET
/v1/extract1 creditFetches a page, keeps the main content and returns it as markdown, text or HTML with title, description and language. Respects robots.txt. 1 credit, 3 with render=true. Price note: 3 with render=true.
| Parameter | In | Type | Rules |
|---|---|---|---|
| url * | query | string | max 2048 chars · Page to read. http or https, public hosts only. |
| render | query | boolean | default false · Load the page in a real browser first (for JavaScript sites). Costs 3 credits instead of 1. Always pass it in the query string. |
| format | query | string | one of markdown, text, html · default markdown · Output format for the main content. |
| links | query | boolean | default false · Also return up to 200 absolute links found on the page. |
curl 'https://api.apifor.dev/v1/extract?url=' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": {
"url": "https://en.wikipedia.org/wiki/Tide_table",
"final_url": "https://en.wikipedia.org/wiki/Tide_table",
"title": "Tide table",
"description": "From Wikipedia, the free encyclopedia",
"language": "en",
"markdown": "From Wikipedia, the free encyclopedia\n\nTabulated data used for tidal prediction\n\n**Tide tables**, sometimes called **tide charts**, are u...",
"links": [
"https://en.wikipedia.org/wiki/Tide_table",
"https://en.wikipedia.org/wiki/Monterey_Bay_Aquarium"
],
"word_count": 675,
"rendered": false,
"fetched_at": "2026-11-28T15:42:50.022Z"
}
}200Main content of the page. Header x-cache is HIT when served from the 1 hour cache.400Invalid parameters or a blocked URL (private address, bad scheme or port)402Not enough credits403robots.txt does not allow APIForBot to read the page422Page too large (5 MB) or not HTML/plain text502The page or the browser failed (upstream status, too many redirects, DNS)503Browser Rendering is busy or unavailable504The page took longer than 15 seconds
POST
/v1/extract6 creditsSame as GET, then a model fills your JSON schema (or follows a short instruction) from the page content. The answer is checked against the schema. 6 credits, 8 with render=true. Price note: 8 with render=true.
| Parameter | In | Type | Rules |
|---|---|---|---|
| render | query | boolean | default false · Load the page in a real browser first (for JavaScript sites). Costs 3 credits instead of 1. Always pass it in the query string. |
| format | query | string | one of markdown, text, html · default markdown · Output format for the main content. |
| links | query | boolean | default false · Also return up to 200 absolute links found on the page. |
{
"url": "https://en.wikipedia.org/wiki/Tide_table",
"json_schema": {
"type": "object",
"properties": {
"topic": {
"type": "string"
},
"used_for": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"topic",
"used_for"
]
}
}curl -X POST 'https://api.apifor.dev/v1/extract' \
-H 'content-type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{"url":"https://en.wikipedia.org/wiki/Tide_table","json_schema":{"type":"object","properties":{"topic":{"type":"string"},"used_for":{"type":"array","items":{"type":"string"}}},"required":["topic","used_for"]}}'{
"success": true,
"data": {
"url": "https://en.wikipedia.org/wiki/Tide_table",
"final_url": "https://en.wikipedia.org/wiki/Tide_table",
"title": "Tide table",
"description": "From Wikipedia, the free encyclopedia",
"language": "en",
"markdown": "From Wikipedia, the free encyclopedia\n\nTabulated data used for tidal prediction\n\n**Tide tables**, sometimes called **tide charts**, are u...",
"links": [
"https://en.wikipedia.org/wiki/Tide_table",
"https://en.wikipedia.org/wiki/Monterey_Bay_Aquarium"
],
"word_count": 675,
"rendered": false,
"fetched_at": "2026-11-28T15:42:50.022Z",
"json": {
"topic": "Tide tables",
"used_for": [
"tidal prediction"
]
},
"model": "@cf/google/gemma-4-26b-a4b-it"
}
}200Main content of the page. Header x-cache is HIT when served from the 1 hour cache.400Invalid parameters or a blocked URL (private address, bad scheme or port)402Not enough credits403robots.txt does not allow APIForBot to read the page422Page too large (5 MB) or not HTML/plain text502The page or the browser failed (upstream status, too many redirects, DNS)503Browser Rendering is busy or unavailable504The page took longer than 15 seconds