Extract

Extract page content as markdown from URLs

Extracts markdown content from up to 10 HTTP(s) URLs. Each URL is processed and the extracted content is returned in the response.

post/extract

Request

  • Base URL: https://kagi.com/api/v1
  • URL: https://kagi.com/api/v1/extract
  • Auth: HTTP bearer

Request body

timeoutnumber float

Optional timeout in seconds for the extraction operation. Out of range values will be clamped back within range.

All URLs are fetched concurrently. This timeout applies a time budget for the entire bulk fetch operation.

format'json' | 'markdown'

(EXPERIMENTAL) Format to serialize the API response as. The exact contents and structure of markdown output is still being worked on - please send your feedback!

Example request

{
  "pages": [
    {
      "url": "https://example.com/article"
    }
  ],
  "timeout": 1.337
}

Response

Successful extraction

Example response

{
  "data": [
    {
      "url": "https://example.com/article",
      "markdown": "# Article Title\n\nThis is the extracted content..."
    }
  ],
  "errors": [
    {
      "code": "extract.invalid_url",
      "url": "https://help.kagi.com/api/errors#extract.invalid_url",
      "message": "URL must be a valid HTTPS URL",
      "location": "pages[0].url"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.