Synoppy v1.0 is here— start free
DocsExtract
Endpoint

Extract

Try it livePOST /api/extract

Sent only to Synoppy over HTTPS · never stored by this page. No key? Get one free →

POST/api/extract reads a page and uses AI to return structured JSON — a default summary, a shape you describe in a prompt, or (strictest) the exact shape of a JSON Schema you pass. Metered by the AI tokens used; requires an API key. This endpoint is live.

Request body

urlstringrequired
The URL to extract from.
promptstring
Optional. Describe the JSON you want (e.g. pricing tiers as a list of name + price). Alias: instruction. Omit for a default { title, summary, topics, entities }.
schemaobject
Optional. A JSON Schema describing the exact output shape — the result is constrained to it (typed output). Works alone or with prompt; pass a Zod schema via z.toJSONSchema(...). Alias: jsonSchema.

Example request

curl -X POST https://synoppy.com/api/extract \
  -H "Authorization: Bearer $SYNOPPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "prompt": "Return { title, summary, topics }"
  }'

# Typed output — pass a JSON Schema and the result matches it exactly:
curl -X POST https://synoppy.com/api/extract \
  -H "Authorization: Bearer $SYNOPPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://stripe.com/pricing",
    "schema": {
      "type": "object",
      "properties": {
        "plans": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name":  { "type": "string" },
              "price": { "type": "string" }
            },
            "required": ["name", "price"]
          }
        }
      },
      "required": ["plans"]
    }
  }'

Response

{
  "success": true,
  "url": "https://news.ycombinator.com",
  "model": "synoppy-extract-1",
  "data": {
    "title": "Hacker News",
    "summary": "Community news on startups, tech and code.",
    "topics": ["startups", "programming", "AI"],
    "entities": ["Y Combinator"]
  },
  "usage": { "inputTokens": 1842, "outputTokens": 96 },
  "latencyMs": 8206,
  "creditsUsed": 6,
  "creditsRemaining": 4994
}

The underlying model is an internal detail with automatic failover; responses always report the engine as synoppy-extract-1.

Response fields

successboolean
True when extraction succeeded.
urlstring
The URL that was read.
modelstring
Always "synoppy-extract-1" — the engine name (the provider is abstracted, with automatic failover).
dataobject
The structured result. With no prompt it's a default { title, summary, topics, entities }; with a prompt it matches the shape you describe.
usage{ inputTokens, outputTokens }
Token counts for the call — the basis for the metered credit cost.
latencyMsnumber
End-to-end time in milliseconds (AI calls are slower than static reads).
creditsUsednumber
Credits charged — metered by the AI tokens used, so cost scales with page size and output.
creditsRemainingnumber
Your credit balance after this call.

In code

import { Synoppy } from "@synoppy/sdk";
const synoppy = new Synoppy({ apiKey: process.env.SYNOPPY_API_KEY });

const res = await synoppy.extract("https://stripe.com/pricing", {
  prompt: "Return plans as a list of { name, monthlyPrice }",
});
console.log(res.data);