> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Extract API

> Pull structured JSON out of any web page: name the fields you want, or send a JSON Schema, and get one row per URL with the values. Pages are always fetched live. Failed extractions and schema mismatches are not charged.

`POST /v1/data/web/extract/run`

**Pricing:** $0.01 per page ($10.00 per 1,000).

## Ways to call it

* **By field names**: set `fields`
* **By JSON Schema**: set `schema`

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**urls** `string[]` *required*

Pages to extract from, up to 100 per request. One row per page.

**fields** `string[]`

Names of the values to pull from each page, like price, title or author.

**schema** `object`

A JSON Schema object (type object with properties) describing the data to extract. Every property needs a type, and every array needs items.

**prompt** `string`

Optional guidance in plain words, like: prices in USD, monthly billing only.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/web/extract/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "urls": [
      "https://news.ycombinator.com/",
      "https://www.firecrawl.dev/pricing"
    ],
    "fields": [
      "top story title",
      "top story points"
    ]
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/web/extract/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "urls": [
        "https://news.ycombinator.com/",
        "https://www.firecrawl.dev/pricing"
    ],
    "fields": [
        "top story title",
        "top story points"
    ]
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/web/extract/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "urls": [
    "https://news.ycombinator.com/",
    "https://www.firecrawl.dev/pricing"
  ],
  "fields": [
    "top story title",
    "top story points"
  ]
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one page, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `url` | URL | text |
| `extractStatus` | Extract Status | text |
| `data` | Data | object |
| `fieldsFound` | Fields Found | integer |
| `statusCode` | Status Code | integer |
| `fetchedAt` | Fetched At | text |
| `engine` | Engine | text |
| `errorType` | Error Type | text |
| `errorMessage` | Error Message | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "web/extract",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "fieldsFound": null,
      "data": null,
      "errorType": "not_found",
      "statusCode": 404,
      "errorMessage": "The page does not exist (the site answered 404 or 410). Check the URL. Not charged.",
      "url": "https://www.python.org/this-page-does-not-exist-xyz-123",
      "engine": null,
      "extractStatus": "failed",
      "fetchedAt": "2026-11-09T10:27:08Z"
    }
  ]
}
```

## Related APIs

For the full page as Markdown use [`web/scrape`](https://docs.mindcase.co/apis/web/scrape); for many pages of a site use [`web/crawl`](https://docs.mindcase.co/apis/web/crawl).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.