Skip to main content
Use POST /v1/products to search a database of over one billion affiliate products refreshed daily. You can filter by price, brand, availability, network, merchant, and dozens of other fields, then sort and paginate the results or request facet aggregations to power dynamic filter UIs.

Query builder

Before writing code, use the interactive query builder at app.affiliate.com/tools/product-search to build and test queries in your browser.

Request

Endpoint: POST /v1/products

Headers

string
required
Must be application/json.
string
required
Your API key as a Bearer token: Bearer {your_api_key}.

Body parameters

Search criteria for products. Mutually exclusive with query — use one or the other. Pass a plain string for a quick lookup, or an array of filter objects for full control over field, value, and operator.Simple string:
Array of objects:
See Search criteria below for all supported fields and operators.
object
Structured rule-based query builder. Mutually exclusive with search — use one or the other. Allows grouping conditions with AND/OR logic across multiple rule sets.
See Query builder examples below.
array | string
Limit which fields are returned. Pass an array of field name strings or a comma-separated string. When omitted, all fields are returned.
integer
default:"100"
Number of results per page. Minimum is 1; maximum depends on your subscription plan.
integer
Page number for pagination. Minimum is 1; maximum depends on your subscription plan.
string
Cursor-based pagination token for accessing results beyond 10,000. Available on plans that support deep pagination. Use the after value returned in meta to fetch the next page.
string
Field to sort results by. Accepted values: relevance, id, barcode, name, description, commission_url, direct_url, image_url, currency, regular_price, final_price, on_sale, sale_discount, availability, stock_quantity, sku, brand, category, network, merchant, updated_at, started_at.
string
Sort direction. Accepted values: asc, desc.
object
Network-specific configurations for affiliate link generation. When you omit this parameter, commission_url values contain @@@ and ### as placeholders that you replace with your affiliate ID and sub-ID manually. When you provide it, the API substitutes your IDs automatically.The key is the network ID as a string. Most networks require affiliate_id. The following networks require additional fields:
object
Optional configurations for supported third-party services. Each key is a service identifier and maps to a service-specific config object.Shopnomix — pass your campaign_id to have the API populate urls.shopnomix with a ready-to-use Shopnomix link:
string
ULID of a pool belonging to the authenticated team. The pool’s networks and merchants are combined with any explicitly passed filter values. Only one pool_id may be passed per request. Returns 422 if the pool does not exist or belongs to another team.
string[]
Array of facets to include in the response. Returns aggregated network and merchant statistics alongside your results. Supports dot notation for specific sub-fields.Must be an array of strings (max 20 items). Passing a comma-separated string returns 422 (The facets must be an array.).Base facets: network, merchant, final_price. Dot notation is supported for sub-fields, e.g. network.name, network.logo_url, merchant.product_count, final_price.min, final_price.max.
string
Remove duplicate results based on field values. Two syntaxes are available:Comma syntax — fields are applied independently. Append [N] to cap results per unique value.
This keeps up to 10 products per merchant and also deduplicates by name.OR syntax — drop a result if either field has already appeared.
This guarantees each merchant appears at most once and each product name appears at most once.Rules for OR syntax:
  • At most 2 fields per || group.
  • [N] per-value limits are not supported inside a || group.
  • Cannot be mixed with comma syntax in the same request.
  • Invalid combinations return 422 with a descriptive message.
  • total in the response is an estimated upper bound; the returned page may occasionally contain fewer items.
Supported fields: name, image_url, direct_url, barcode, merchant.id.
object
Advanced result balancing with round-robin interleaving and optional weighting. Use this to prevent high-volume merchants from dominating results.
balanced_mix and duplicate_fields_to_exclude cannot be used together. Use one or the other.
boolean
default:"false"
When true, replaces your sub-ID with a click_id to enable consolidated click reporting.

balanced_mix vs duplicate_fields_to_exclude

Search criteria

The search parameter accepts either a plain string or an array of filter objects. Each object in the array specifies a field, value, and operator.
Multiple values: Use || as a logical OR separator within the value string.
To AND values, create separate filter objects in the array — each object is combined with AND logic.
Omitted operators default to =. Case sensitivity: Most fields are case-insensitive. The following fields are case-sensitive: barcode, sku, mpn, asin.

Supported search fields

Response

A successful request returns a JSON object with meta, an optional facets object, and a data array of product objects.

meta object

facets object

Only present when you include the facets parameter. Contains aggregated statistics about networks and merchants in your result set.

Product object

Each item in the data array is a product object. Fields are organized by category below.

Core

URLs

Outclick URL query parameters:

Pricing

Inventory

Identifiers

Attributes

Specialized attributes

Network and merchant

System

Examples

Query builder examples

Multiple brands with exclusion

Brand + price range (AND logic)

Error codes