Get contents

Metadata and short verbatim excerpts of up to 10 URLs.

POSThttps://api.typesearch.ai/v1/contents

Returns, for each URL, its title, description, publication date, source and a short excerpt from the beginning — never the full text. With a query, the model picks the excerpts about it and scores each page’s relevance.

Each URL has its own status: one that fails never fails the request.

Body

  • urlsuri[]required

    Up to 10 full URLs.

    Items: up to 10

  • querystring

    When set, the model picks the excerpts about this query and scores each page’s relevance.

  • highlightsbooleanDefault: true

    Return verbatim excerpts. Defaults to true.

  • max_tokensinteger | null

    A hard cap on model tokens for this request, minimum 2000. If it is reached, you get everything judged so far with incomplete: true.

    Range: 2000–9007199254740991

Response

  • idstring

    The request id.

  • object"contents"

    Always contents.

  • resultsobject[]

    One entry per URL, in the order they were sent.

    Show child attributes
    • urlstring

      The article’s canonical URL.

    • statusenum<string>

      ok or error. A failing URL never fails the whole request.

    • errorobject | null

      When status is error: the reason.

      Show child attributes
      • codestring

        A stable code.

      • messagestring

        A human-readable explanation.

    • titlestring | null

      The headline.

    • descriptionstring | null

      The description the page declares.

    • published_atstring | null

      Publication time, ISO 8601 in UTC.

    • sourcestring | null

      The publication.

    • excerptstring | null

      The beginning of the article, short. Never the full text.

    • highlightsstring[]

      Verbatim excerpts; about query when one was sent.

    • relevancenumber | null

      With query: the probability that the page is about it.

  • usageobject

    What the request consumed.

    Show child attributes
    • tokensinteger

      Model tokens. 0 when served from cache.

      Range: -9007199254740991–9007199254740991

    • callsinteger

      Model calls.

      Range: -9007199254740991–9007199254740991

    • cost_usdnumber | null

      Cost in US dollars, when known.

    • duration_msinteger

      Time on the server, in milliseconds.

      Range: -9007199254740991–9007199254740991