Documents

Fetch a document by canonical URI, or search inside it with `text_filter`.

Retrieve document text with optional token bounds and passage filtering. A repeated successful fetch can incur another usage charge.

get/v2/documents/by-uri/{uri}

Request

  • Base URL: https://api.machinelibrary.ai
  • URL: https://api.machinelibrary.ai/v2/documents/by-uri/{uri}
  • Auth: one of:
    • API key in header X-Api-Key
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.machinelibrary.ai/v2/oauth/authorize, token URL https://api.machinelibrary.ai/v2/oauth/token, scopes: search)

Path parameters

uristring required

Percent-encoded canonical URI, such as doi://10.1000/example.

Query parameters

text_filterstring

When present, return up to five matching passages instead of the full document. Double-quoted spans must occur verbatim in the passage.

max_tokensinteger

Return exactly the first N content tokens. Omit to return all content tokens.

max_charsinteger

Return at most the first N content characters. Billing counts only the returned tokens; a cut body reports its full length in content_length.

Response

Document or in-document search results.

OR

Changes

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