border.bot
Esc
  • Loading…
↑ ↓ to move↵ to openEsc to close
Docs menu

Read a product page

POST https://api.border.bot/v1/products/extract

Requires an access token from an API client (Authorization: Bearer <access_token>).

Fetch a product page and extract its title, brand, price, materials, images and any stated country of origin.

API client scope: origin.

Headers#

Name Type Required Description
idempotency-key string no Make retries safe: a repeat with the same key returns the original result without charging again (keys are scoped to your workspace).

Request body (JSON)#

Name Type Required Description
url string yes Product page URL (http/https).

Responses#

  • 200: The extracted product. (ExtractProductResponse)
  • 400: Invalid input (invalid_input). (Error)
  • 401: Missing, invalid or expired access token, or a revoked or expired API client (unauthorized). (Error)
  • 402: Not enough credits (insufficient_credits). Nothing was charged. (Error)
  • 403: Workspace suspended, action disabled, or the client lacks the scope (org_suspended, action_disabled, forbidden). (Error)
  • 409: A request with this Idempotency-Key is still in progress (conflict). (Error)
  • 429: Rate limited (rate_limited). Retry after Retry-After seconds; RateLimit says which limit was hit (r=0, t seconds until its window ends) and RateLimit-Policy its quota. (Error)
  • 500: Unexpected error (internal). (Error)
  • 502: The engine failed (upstream_error). The credits are refunded automatically. (Error)
  • 504: The engine timed out (upstream_timeout). The credits are refunded automatically. (Error)

Example request#

curl -X POST https://api.border.bot/v1/products/extract \
  -H "Authorization: Bearer $BORDERBOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "url": "<string>"
  }'

Example response (200)#

JSON
{
  "data": {
    "url": "string",
    "finalUrl": "string",
    "siteName": "string",
    "title": "string",
    "description": "string",
    "brand": "string",
    "sku": "string",
    "gtin": "string",
    "mpn": "string",
    "category": "string",
    "material": "string",
    "color": "string",
    "price": 0,
    "currency": "string",
    "images": [
      "string"
    ],
    "countryOfOrigin": "string",
    "originEvidence": "string",
    "sources": [
      "json-ld"
    ],
    "summary": "string"
  },
  "credits": {
    "charged": 0,
    "remaining": 0,
    "usageId": "string"
  },
  "replayed": false
}