JSON
POST/extract/json
Fetches a URL and extracts structured data according to a provided JSON schema
Body Parameters
json_schema: unknown
JSON schema definition that describes the structure of data to extract.
url: string
URL to fetch and extract data from
formaturi
nocache: optional boolean
Bypass cache and force fresh data retrieval
JSON
curl https://api.tabstack.ai/v1/extract/json \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TABSTACK_API_KEY" \
-d '{
"json_schema": {
"properties": {
"stories": {
"items": {
"properties": {
"author": {
"description": "Author username",
"type": "string"
},
"points": {
"description": "Story points",
"type": "number"
},
"title": {
"description": "Story title",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"url": "https://news.ycombinator.com",
"effort": "standard"
}'{
"error": "invalid JSON request body"
}{
"error": "failed to fetch URL"
}Returns Examples
{
"error": "invalid JSON request body"
}{
"error": "failed to fetch URL"
}