Extract All docs

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 credit

Fetches 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.

ParameterInTypeRules
url *querystringmax 2048 chars · Page to read. http or https, public hosts only.
renderquerybooleandefault 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.
formatquerystringone of markdown, text, html · default markdown · Output format for the main content.
linksquerybooleandefault false · Also return up to 200 absolute links found on the page.
GET/v1/extract
curl 'https://api.apifor.dev/v1/extract?url=' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "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 credits
  • 403robots.txt does not allow APIForBot to read the page
  • 422Page too large (5 MB) or not HTML/plain text
  • 502The page or the browser failed (upstream status, too many redirects, DNS)
  • 503Browser Rendering is busy or unavailable
  • 504The page took longer than 15 seconds
POST/v1/extract6 credits

Same 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.

ParameterInTypeRules
renderquerybooleandefault 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.
formatquerystringone of markdown, text, html · default markdown · Output format for the main content.
linksquerybooleandefault false · Also return up to 200 absolute links found on the page.
Request body · application/json
{
  "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"
    ]
  }
}
POST/v1/extract
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"]}}'
Example response · 200
{
  "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 credits
  • 403robots.txt does not allow APIForBot to read the page
  • 422Page too large (5 MB) or not HTML/plain text
  • 502The page or the browser failed (upstream status, too many redirects, DNS)
  • 503Browser Rendering is busy or unavailable
  • 504The page took longer than 15 seconds

Error handling · Rate limits · Prices