Up to 20 URLs (HTML or PDF) as Markdown, text or HTML, with query-ranked highlights, links and images (1 credit per URL read)

Every URL is billed only when it comes back: 1 credit, 0.5 from cache. URLs that fail are listed in failed and cost nothing. The response is 200 even when every URL failed. Highlights are ranked with BM25 (lexical, no model).

post/v1/extract

Request

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

Request body

urlsstring[] required

HTML pages or PDFs (duplicates are dropped)

format'markdown' | 'text' | 'html'
querystring

What highlights are ranked against

highlightsinteger

Query-ranked passages per page (BM25; needs query)

max_tokensinteger

Trim each page's markdown or text to about this many tokens

include_linksboolean
include_imagesboolean
max_ageinteger

Accept a cached page up to this many seconds old (0.5 credit)

countrystring

Fetch through an exit in this country (ISO 3166-1 alpha-2)

timeoutinteger

Seconds to wait for the pages; a page still loading is listed in failed (upstream_timeout, not charged)

Response

OK

Example response

{
  "results": [
    {
      "metadata": {
        "content_type": "text/html"
      }
    }
  ],
  "failed": [
    {
      "error": {
        "code": "invalid_request"
      }
    }
  ]
}

Changes

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