Guides
Structured data extraction
Get clean, typed fields out of a page with a JSON Schema.
When you know exactly which fields you want, pass a jsonSchema and get back a typed object instead of a page you have
to parse yourself.
curl https://request.usestring.ai/v1/fetch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product/123",
"jsonSchema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": ["number", "null"] },
"inStock": { "type": "boolean" }
},
"required": ["name"]
}
}'Tips
- Mark the fields you truly need in
required— if extraction can't fill them, the request falls back to the raw page rather than returning a partial object. - Add
descriptions to your schema properties to guide extraction. - Keep schemas within the bounds: depth 10, 200 keys, 50 KB.
See Structured extraction for the full rules and the dynamic extraction fee.