Parsew
API Reference

Extract structured data

Scrape a web page and extract structured data using an LLM. Define a JSON Schema for the output shape and provide a natural-language prompt. Costs 5 credits.

POST
/extract

Scrape a web page and extract structured data using an LLM. Define a JSON Schema for the output shape and provide a natural-language prompt. Costs 5 credits.

Authorization

bearerAuth
AuthorizationBearer <token>

Secret API key (sr_ prefix). Pass as Authorization: Bearer sr_...

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.parsew.com/v1/extract" \  -H "Content-Type: application/json" \  -d '{    "url": "https://example.com",    "schema": {      "type": "object",      "properties": {        "title": {          "type": "string"        },        "price": {          "type": "number"        }      },      "required": [        "title"      ]    },    "prompt": "Extract the product title and price"  }'
{
  "data": {
    "property1": null,
    "property2": null
  },
  "warning": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}