Advanced
Extract (Beta)
Extract structured data from a URL based on a prompt and schema. Every request costs 10 credits.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
Parameters for data extraction
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/extract" \ -H "Content-Type: application/json" \ -d '{ "url": "https://sports.yahoo.com/nba/scoreboard/?confId=&dateRange=2025-04-11", "prompt": "Extract all head-to-head match results including date, teams, final scores, and halftime scores if available.", "response_format": { "type": "json_schema", "json_schema": { "type": "object", "properties": { "matches": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "format": "date" }, "home_team": { "type": "string" }, "away_team": { "type": "string" }, "home_score": { "type": "integer" }, "away_score": { "type": "integer" } }, "required": [ "date", "home_team", "away_team", "home_score", "away_score" ] } } }, "required": [ "matches" ] } } }'{ "success": true, "extractParameters": { "url": "https://sports.yahoo.com/nba/scoreboard/?confId=&dateRange=2025-04-11" }, "results": { "matches": [ { "date": "2025-04-11", "home_team": "Philadelphia76ers", "away_team": "AtlantaHawks", "home_score": 110, "away_score": 124 }, { "date": "2025-04-11", "home_team": "IndianaPacers", "away_team": "OrlandoMagic", "home_score": 115, "away_score": 129 } ] }}{ "error": 0, "message": "string"}{ "error": 0, "message": "string"}