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/structure

Request

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

FieldTypeDefaultDescription
urlsrequiredstring[]-1 to 20 URLs to read.
schemarequiredobject-Map of field name to type hint, for example { "price": "string" }.
formatstringmarkdownInternal read format used before structuring.

Response

FieldTypeDescription
resultsobject[]Per URL: url, data (your fields), fields (value, confidence, evidence per field), warnings, and overall confidence.
failed_resultsobject[]URLs that could not be read, with an error.
response_timefloatServer processing time in seconds.
request_idstringUnique ID for this request.
credits_chargedintCredits 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.