Suprsonic

Document Extraction

Extract structured data from URLs or content. Returns the extracted data as JSON (shaped by your schema when you pass one), with the source URL and whether long content was truncated. Use to turn a page or a text into structured fields. For a page's full text use scrape; for invoices and receipts use invoice-parse. Pass url or content; extraction_prompt says what to extract, and schema fixes the shape of the JSON you get back. Cost: 3 credits, charged only when a call succeeds.

post/v1/documents/extract

Request

  • Base URL
    https://suprsonic.ai
  • Auth
    HTTP bearer

Request body

urlstring nullable

URL to scrape and extract from

contentstring nullable

Pre-scraped content to extract from (alternative to url)

extraction_promptstring nullable

REQUIRED unless schema is provided. Natural language description of what to extract, e.g. 'Extract all product prices and features'

schemaobject nullable

REQUIRED unless extraction_prompt is provided. JSON schema defining the structure of data to extract

Response

The call's envelope: success, data (the capability's result), metadata, and credits_used (0 when the call did not succeed).

successboolean required
credits_usedinteger

Changes

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