- Name, description, category of the product
- Pricing models, listed price and ISO currency code
- List of features, the product’s target audience, and more
Integrate Context.dev's Product API in your app
Prerequisites
-
A Context.dev API key. Sign up at context.dev/signup, copy the key from the dashboard (prefix
ctxt_secret_), and export it: -
An SDK (optional). Install for your language, or skip the install and call directly with
curl:
Extract a single product
POST /brand/ai/product takes a single product URL and returns whether the page is a product page, the detected ecommerce platform, and the extracted product record.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
url | string (URI) | Required. The product page URL. |
maxAgeMs | integer (0-2592000000) | Return a cached result if one exists younger than this many milliseconds. Set to 0 to always scrape fresh. Max 30 days. Defaults to 604800000 (7d). |
timeoutMS | integer (1000-300000) | Abort with a 408 if the request exceeds this many milliseconds. Max 300000 (5 min). |
Response
| Field | Type | Description |
|---|---|---|
is_product_page | boolean | Whether the URL was recognized as a product detail page. |
platform | string | null | One of amazon, tiktok_shop, etsy, generic. null when not a product page. |
product | object | null | The extracted product record. null when not a product page or when extraction failed (e.g. bot protection). |
product.name | string | Product name. |
product.description | string | Product description. |
product.price | number | null | Numeric price for the listed currency. null when no price is shown. |
product.currency | string | null | ISO currency code (e.g. USD, EUR). |
product.billing_frequency | string | null | One of monthly, yearly, one_time, usage_based. |
product.pricing_model | string | null | One of per_seat, flat, tiered, freemium, custom. |
product.url | string | null | Canonical product page URL. |
product.category | string | null | Single category label. |
product.features | string[] | Bulleted feature claims, one sentence each. |
product.target_audience | string[] | Audience tags (e.g. Men, Small teams). |
product.tags | string[] | Free-form tags. |
product.image_url | string | null | Primary image URL (CDN-hosted). |
product.images | string[] | Up to 7 product image URLs (CDN-hosted). |
product.sku | string | null | Stock keeping unit. null for SaaS, services, and other non-inventoried offerings. |
Handle errors
A non-2xx response returns an{ message, error_code } envelope:
| Status | error_code | Meaning | What to do |
|---|---|---|---|
| 400 | INPUT_VALIDATION_ERROR | Missing or malformed url | Validate input before the call. |
| 401 | UNAUTHORIZED | API key missing, invalid, or deleted | Re-check the env var and the dashboard. |
| 408 | REQUEST_TIMEOUT | Page didn’t finish extracting before timeoutMS (or 5 min default) | Retry once with backoff. |
| 500 | INTERNAL_ERROR | Transient server error | Retry once with backoff; if it persists, contact support. |
url:
Use cases
- Build a printable product catalog: Use a website’s sitemap to find all products, run
extract_producton each page - Procurement / ERP auto-fill: when a buyer pastes a product URL into a procurement form, populate
sku,name,description,currency,priceandfeaturesautomatically.
Next steps
Prefetch for Faster Response
Hide cold-hit latency from your users.
Handle Rate Limits
Backoff strategies, client cache, and prefetch fallbacks.
Best Practices
Caching, error handling, and key hygiene.
Troubleshooting
Status codes, retry patterns, and common errors.