Core APIs
Structured extraction
Turn messy pages into predictable JSON. Describe the fields you want and get typed values with per-field confidence.
Overview
Provide a list of URLs and a schema of field names mapped to type hints. Ohsee reads each page and returns values matching your schema, with a confidence score and supporting evidence per field.
POST
/structureRequest
Request
curl https://api.ohsee.tech/structure \
-H "Authorization: Bearer ohsee-<your-key>" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com/pricing"],
"schema": { "plan_name": "string", "monthly_price": "string" }
}'Parameters
| Field | Type | Default | Description |
|---|---|---|---|
urlsrequired | string[] | - | 1 to 20 URLs to read. |
schemarequired | object | - | Map of field name to type hint, for example { "price": "string" }. |
format | string | markdown | Internal read format used before structuring. |
Response
| Field | Type | Description |
|---|---|---|
results | object[] | Per URL: url, data (your fields), fields (value, confidence, evidence per field), warnings, and overall confidence. |
failed_results | object[] | URLs that could not be read, with an error. |
response_time | float | Server processing time in seconds. |
request_id | string | Unique ID for this request. |
credits_charged | int | Credits deducted for this request. |
200 OK
{
"results": [
{
"url": "https://example.com/pricing",
"data": { "plan_name": "Pro", "monthly_price": "$29" },
"fields": {
"plan_name": { "value": "Pro", "confidence": 0.96, "evidence": "Pro plan" },
"monthly_price": { "value": "$29", "confidence": 0.93, "evidence": "$29 / mo" }
},
"warnings": [],
"confidence": 0.94
}
],
"failed_results": [],
"response_time": 1.10,
"request_id": "77a0b1c2",
"credits_charged": 2
}Credits
2 credits per successfully structured URL, plus 1 more per URL when your schema has more than 8 fields. Only successful URLs are charged.
You can also structure pages inline by passing
schema to /extract.