POST /v1/extract ยท output_schema
AI Data Extraction API
Describe the data you want as a JSON Schema and point it at up to 20 pages or PDFs. SerpKite reads each one, and Claude fills your schema from the page, so you get typed JSON instead of HTML to parse.
Overview
What the AI Data Extraction API does
output_schema on /v1/extract turns the Web Extract API into an LLM extraction API. Each page is fetched (logged out, through proxies, JavaScript rendered when needed), converted to Markdown, and Claude Haiku 5.5 returns the data that matches your JSON Schema in results[].output. An optional prompt says what to pick and how to normalise it ("prices in USD", "null when missing"). Values come only from the page.
A schema whose fields are all booleans or enums (classification: "is this a pricing page?", "which plan tier?") is answered by OpenAI's Decisions API instead, which always returns values that match the schema. summary: true adds a 3โ6 sentence summary of each page for +4 credits.
Billing is per page: 1 credit for the page plus 4 for the extraction, 5 in total. A page that fails is listed in failed and costs nothing; an extraction that fails is reported in output_error and only the page is billed.
What you get
-
requestobject - urls (deduplicated), format, query.
-
results[]array - One entry per page read: url (final, after redirects), status_code, title, published_at, metadata, cached, markdown / text / html, and links, images, highlights (text, score, heading) when asked for.
-
results[].summary / summary_errorstring | null - With summary: true: the summary, or null and the reason it failed (not charged).
-
results[].output / output_errorany - With output_schema: the JSON value matching your schema, or null and the reason it failed (not charged).
-
failed[]array - URLs that could not be read: url, error (code, message). Not charged.
-
metaobject - request_id, credits_used, latency_ms, succeeded, failed, and llm (provider, model, tokens) when an AI step ran.
Request
curl https://api.serpkite.com/v1/extract \
-H "Authorization: Bearer $SERPKITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.example.com/pricing"],"output_schema":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"price_per_month":{"type":"number"},"seats":{"type":"integer"}}}},"free_trial":{"type":"boolean"}}},"prompt":"Monthly prices in USD; null when a plan has no list price."}'Response (illustrative, placeholder domains)
{
"request": {
"endpoint": "extract",
"urls": [
"https://www.example.com/pricing"
],
"format": "markdown"
},
"results": [
{
"url": "https://www.example.com/pricing",
"status_code": 200,
"title": "Pricing ยท Example",
"cached": false,
"markdown": "# Pricing\n\nโฆ",
"output": {
"plans": [
{
"name": "Starter",
"price_per_month": 19,
"seats": 1
},
{
"name": "Team",
"price_per_month": 79,
"seats": 5
},
{
"name": "Enterprise",
"price_per_month": null,
"seats": null
}
],
"free_trial": true
}
}
],
"failed": [],
"meta": {
"request_id": "req_01J8ZK4M6Q2V7",
"credits_used": 5,
"latency_ms": 5120,
"succeeded": 1,
"failed": 0,
"llm": {
"provider": "anthropic",
"model": "claude-haiku-5-5",
"input_tokens": 2840,
"output_tokens": 96
}
}
}
Every response also carries X-Credits-Used, X-Credits-Remaining,
X-Cache and X-Tokens-Estimate headers.
Full endpoint reference
Reference
Parameters
The fields /v1/extract accepts in its JSON body.
| Name | Type | Default | Description |
|---|---|---|---|
urls
required
|
string[] | โ | 1โ20 public http(s) URLs of HTML pages or PDFs. |
format
|
string | markdown | What each result carries: markdown, text or the raw html. Values: markdown, text, html. |
query
|
string | โ | What highlights are ranked against (up to 4,096 characters). |
highlights
|
integer | 0 | Passages per page ranked against query, 0โ10 (about 600 characters each). |
max_tokens
|
integer | โ | Trim each page's Markdown or text to about this many tokens (100โ100,000). |
include_links
|
boolean | false | Webpage: also return the page's outbound links (url, text). |
include_images
|
boolean | false | Webpage: also return the page's image URLs. |
max_age
|
integer | โ | Accept a cached page up to this many seconds old, for 0.5 credit. |
country
|
string | โ | Fetch the pages as seen from this country (two-letter ISO code). |
timeout
|
integer | โ | Seconds to wait for the pages, 1โ90 (default 50, or 75 with summary or output_schema). A page still loading is listed in failed (upstream_timeout) and not charged. |
summary
|
boolean | false | Add a 3โ6 sentence AI summary of each page, focused on query when set. +4 credits per page; a failed summary is free. |
output_schema
|
object | โ | A JSON Schema (at most 16 KB). Each page's data comes back as JSON matching it in output. +4 credits per page; a failed extraction is free. |
prompt
|
string | โ | Guides the output_schema extraction: what to pick and how to normalise it (up to 4,096 characters). Needs output_schema. |
Full reference, error codes and headers are in the /v1/extract reference.
Use cases
What people build with the AI Data Extraction API
Prices and products
Plans, prices and specs from product and pricing pages, as rows for your database.
Lead and company data
Company facts, team size and contact pages turned into typed fields.
Classification
Boolean and enum schemas label pages (docs, pricing, blog, login wall) with schema-valid answers.
Documents to records
PDF filings, papers and manuals become JSON with the fields you name.
Pricing
AI Data Extraction API pricing
Cost per call
5 credits
per page with output_schema (1 for the page + 4 for the JSON); failed pages and extractions are free
- From $3.00 per 1,000 pages at volume.
- Credits never expire. No subscription.
- Failed, empty and blocked calls are refunded.
- 2,500 free credits = 500 pages, then 1,000 credits a month.
| Pack | Price | Per 1k credits | Per 1k pages | Pages per pack |
|---|---|---|---|---|
| Starter | $10 | $1.00 | $5.00 | 2,000 |
| Growth | $50 | $0.80 | $4.00 | 12,500 |
| Pro | $300 | $0.60 | $3.00 | 100,000 |
For reference, Firecrawl's JSON format costs 1 credit per page plus 4 for the extraction (list prices checked 2026-10-03). SerpKite: 5 credits per page, from packs whose credits never expire.
FAQ
AI Data Extraction API: common questions
Keep exploring
Related APIs and integrations
Start building
Start with the AI Data Extraction API
2,500 free credits, then 1,000 every month. No credit card.