Docs · Reference
AI Data Extraction
GET /v1/ai/extractUsage-basedcache 60 minStructured JSON from any web page, extracted by Claude. Give a URL and either a JSON Schema or a plain list of the fields you want (with optional instructions); the page is fetched (optionally rendered in Chrome), reduced to its main content as Markdown and read by the model, which only returns values that appear on the page. Billed by the model's actual token usage plus one credit for the page, never above your max_credits.
Query parameters
urlstring · required | Public http(s) URL of the page to extract from. |
schemastring | JSON Schema of the object to return. Give schema or fields. Default: null |
fieldsstring | Field names to extract, optionally with a description: ['company', 'price: monthly price of the cheapest plan'] or {'company': 'company name'}. Give schema or fields. Default: null |
instructionsstring | Extra guidance for the extraction, e.g. 'prices in EUR only'. Default: null |
renderboolean | Render JavaScript in real Chrome before reading the page (+1 credit). Default: false |
wait_msinteger | With render=true: extra wait after load. Default: 1000 |
contentstring | 'main' = the page's main content as Markdown (boilerplate removed); 'full' = all visible text. Default: "main" Allowed: main, full |
include_linksboolean | Keep link URLs in the text sent to the model. Default: false |
respect_robotsboolean | Refuse URLs disallowed by the site's robots.txt. Default: true |
max_charsstring | Truncate the page text to this many characters (the server limit applies when lower; default 60,000). Default: null |
max_creditsinteger | The most this call may cost. The actual charge follows the model's token usage and is never higher. Default: 150 |
max_ageinteger | Accept a cached answer up to this many seconds old, billed at 50%. |
Response data fields
Example
curl "https://api.gridlode.com/v1/ai/extract?" \
-H "Authorization: Bearer $GRIDLODE_KEY"Try it without code on the AI Data Extraction API page.