Documentation

API URL


POST /api/v1/structured-extraction/extract

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
POST https://datpaq.com/api/v1/structured-extraction/extract?api_key=your-api-key | Body: {"url":"https://example.com/product","selectors":{"title":"h1.product-title","price":".price"}}

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "data": {
    "title": "Amazing Widget",
    "price": "$29.99"
  },
  "metadata": {
    "timingMs": 12,
    "fromCache": false,
    "correlationId": "req_abc123",
    "timestamp": "2026-10-13T12:00:00.000Z",
    "processingTime": "12ms",
    "api_token_name": null,
    "rate_limit": {
      "limit": null,
      "remaining": null,
      "reset": null
    }
  },
  "correlationId": "req_abc123",
  "updatedAt": "2026-10-13T12:00:00.000Z"
}

Error Response

Example
Code
HTTP 400 ValidationError: Missing selectors or both/neither of url and html — Request rejected before extraction; HTTP 401 AuthenticationError: Gateway authentication failure — Request rejected due to missing or invalid API credentials; HTTP 403 SsrfBlocked: URL destination failed SSRF policy — Reasons include blocked-hostname and dns-resolved-to-blocked-ip; HTTP 404 NotFound: Unknown endpoint path — Request path does not map to available structured-extraction routes; HTTP 413 ResponseTooLarge: Upstream HTML exceeds 2 MB — Reason response-too-large; HTTP 429 RateLimitError: More than 30 requests in 15 minutes — Request rejected by service rate limiter; HTTP 502 FetchError: URL fetch failed or upstream HTTP error — Reasons fetch-failed or upstream-error; HTTP 500 InternalError: Unexpected extraction failure — Extraction could not complete

Last Updated:  May 4, 2026