/api endpoints and v2 endpoints to help you successfully migrate your integration. The /api endpoints use synchronous processing with legacy response formats, while v2 endpoints use standardized response envelopes and asynchronous processing where applicable.
Legacy Endpoints: The
/api endpoints are still available for backward compatibility but are considered legacy. New integrations should use v2 endpoints for better performance, scalability, and consistency.Overview of Changes
The main improvements in v2 include:- Asynchronous Product Extraction:
/api/productsand/api/productare replaced with async/v2/extractendpoint requiring polling - Standardized Response Format: All endpoints now follow a unified response structure with
data,pagination, andmetafields - New Price Format: Products now use a JSON
priceobject instead of separateprice_amount/price_currencyfields - Enhanced Pagination: Vendors and Usage endpoints now support pagination
- Better Error Handling: Enhanced error responses with additional context fields
- HTTP Status Codes: Better adherence to REST standards (e.g., 202 Accepted for async operations)
Product Extraction Endpoints
The product extraction endpoints have undergone the most significant changes, moving from synchronous to asynchronous processing.Major Changes
1. Products Endpoint
API:/api/productreturns the product immediately (synchronous)/v2/extractreturns an execution ID and requires polling for results (asynchronous)
/api/productaccepts a singleurlstring;/v2/extractrequires an arrayurls(even for a single URL)/api/productreturns product immediately;/v2/extractrequires pollingGET /v2/extract/{execution_id}- Response field changed from
producttodata(array) - Price format changed from
price_amount/price_currencytopriceJSON object enable_enrichmentdefault changed fromtruetofalsein v2- Removed
force_extractionparameter in v2 (always extracts) - HTTP status code changed to
202 Acceptedfor POST (was200 OK) - Execution ID format:
extract-urls-{uuid}for URLs mode
2. Polling for Results
Since/v2/extract is asynchronous, you must poll for results:
API Pattern (synchronous):
- Must implement polling logic instead of waiting for synchronous response
- Check
statusfield:"pending","running","completed", or"failed" - Access products via
datafield whenstatus === "completed" - Check
meta.progressfor real-time progress during"running"status
Migration Steps for Product Extraction Endpoints
- Update endpoint paths: Change
/api/productor/api/productsto/v2/extract - Convert to async pattern: Implement polling logic instead of waiting for immediate response
- Update request format: For single product, wrap URL in array:
{urls: [url]} - Update response parsing: Change
productorproductstodataarray - Update price field access: Change
price_amount/price_currencytoprice.current_value/price.currency - Handle pagination: Results are paginated; use
pageandpage_sizequery parameters when fetching status - Update default values: Set
enable_enrichmentexplicitly if you were relying on API’s default oftrue - Handle errors: Check
status === "failed"and readerrorfield instead of checking individual productsuccessflags
Search Endpoint
The Search endpoint has undergone moderate changes, primarily in response format standardization and price format updates.Major Changes
API:- Request body structure remains largely the same
limitparameter renamed topage_sizein v2- Default
page_sizechanged from 10 to 20 in v2
- Response field changed from
productstodata - Price format changed from
price_amount/price_currencytopriceJSON object - Pagination fields moved from
metato dedicatedpaginationobject currentPagerenamed topagein paginationpageSizerenamed topage_sizein pagination- Added
has_nextandhas_prevboolean fields totalItemsmoved topagination.total_itemstotalPagesmoved topagination.total_pages- Default
page_sizechanged from 10 to 20 - Request parameter
limitrenamed topage_size
Migration Steps for Search Endpoint
- Update response parsing: Change
productstodata - Update pagination access: Access pagination fields from
paginationobject instead ofmeta - Update price field access: Change
price_amount/price_currencytoprice.current_value/price.currency - Update query parameters: Change
limittopage_sizein request body - Handle default change: Adjust for default
page_sizechange from 10 to 20, or set explicitly - Update pagination field names: Change
currentPagetopage,pageSizetopage_size
Agentic Search Endpoint
The Agentic Search endpoint uses AI to find products based on natural language queries.Major Changes
API:/api/searchis a traditional search endpoint/v2/agentic-searchuses AI-powered semantic search with web browsing capabilities
Vendors Endpoint
The Vendors endpoint has added pagination support and standardized response format.Major Changes
API:- Response field changed from
vendorstodata - Added pagination support via
pageandpage_sizequery parameters - Added
paginationobject to response - Default
page_sizeis 20 (API returns all vendors) - Added
metaobject (empty for this endpoint)
page: Page number (1-indexed, default: 1)page_size: Items per page (default: 20, max: 100)
Migration Steps for Vendors Endpoint
- Update response parsing: Change
vendorstodata - Add pagination handling: Implement pagination if you need to handle large vendor lists
- Handle response structure: Access vendors from
dataarray instead ofvendorsarray
Usage Endpoint
The Usage endpoint has added pagination support and standardized response format.Major Changes
API:- Response field changed from
usagetodata periodmoved from top-level tometa.period- Added pagination support via
pageandpage_sizequery parameters - Added
paginationobject to response - Default
page_sizeis 20 (API returns all usage statistics) - Default
periodis `“30d” (same as API)
period: Time period (24h, 7d, 30d, 90d, all) - default: 30dpage: Page number (1-indexed, default: 1)page_size: Items per page (default: 20, max: 100)
Migration Steps for Usage Endpoint
- Update response parsing: Change
usagetodata - Update period access: Access
periodfrommeta.periodinstead of top-level - Add pagination handling: Implement pagination if you need to handle large usage lists
- Handle response structure: Access usage statistics from
dataarray instead ofusagearray
General Changes
Response Format Standardization
All v2 endpoints follow a consistent response structure:- API endpoints used various response formats (e.g.,
products,vendors,usage) - v2 uses consistent
datafield for all responses - Pagination moved to dedicated
paginationobject - Metadata moved to
metaobject
Price Format Changes
API Price Format:- Separate
price_amountandprice_currencyfields consolidated intopriceobject - Added
compare_at_valuefield (may be null) price_amount→price.current_valueprice_currency→price.currency
HTTP Status Codes
API:200 OKfor all successful requests (synchronous)
202 Acceptedfor async operations (POST requests that start async processing)200 OKfor sync operations (GET requests, completed status responses)
Error Handling
API Error Response:- Error responses now use structured
errorobject instead of string - Added
codeandrequest_idfields for better error tracking - Additional context fields may be included for specific error types (e.g.,
invalid_urlsfor validation errors) - All error responses include
Request-IDheader matching therequest_idin the response body
Pagination Consistency
API:- Mixed pagination structures across endpoints
- Some endpoints had no pagination (e.g., vendors, usage)
- Inconsistent field names (
currentPagevspage,limitvspage_size)
- Consistent pagination structure across all endpoints:
page: Current page number (1-indexed)page_size: Number of items per pagetotal_items: Total number of itemstotal_pages: Total number of pageshas_next: Boolean indicating if next page existshas_prev: Boolean indicating if previous page exists
Query Parameter Naming
limit→page_size(in all endpoints)- All pagination-related parameters now consistently use
pageandpage_size
Default Values
enable_enrichment: Changed fromtrue(API) tofalse(v2) - Important: Set explicitly if you need enrichmentpage_size(search): Changed from 10 (API) to 20 (v2)page_size(vendors): No pagination in API, default 20 in v2page_size(usage): No pagination in API, default 20 in v2
Enable Flags and Response Schema Behavior
All endpoints that supportenable_* flags maintain a consistent response schema. Fields are always present in the response, but will be null (or empty objects/arrays) when the corresponding flag is false.
Key Principles:
- Schema Consistency: The response structure never changes based on flag values
- Type Safety: Your code can always expect the same structure
- Predictable Parsing: No need to check for field existence
- Clear Intent:
nullexplicitly indicates the feature was disabled or data unavailable
null.
Affected Endpoints:
/v1/products- Product extraction (async)/v2/extract- Product extraction (async)/v2/agentic-search- AI-powered product search (async)/v2/agentic-search-mini- Lightweight AI product search (sync)
enable_enrichment: Controls AI-generated attributes and categorizationenable_reviews: Controls product review dataenable_image_tags: Controls AI-generated image tagsenable_brand_pdp: Controls brand product detail page discoveryenable_similar_products: Controls similar products discoveryenable_reddit_insights: Controls Reddit insights gathering