Filters
Definition
Filters in Criteo's Retail Media Delivery API are designed to mirror the filtering options that shoppers use when browsing product listings.
This allows for a more targeted and relevant ad delivery based on specific product attributes.
Each filter has three main properties:
- name,
- operator,
- value.
Name
This can be one of the standard filters like brand
, price
, or rating
, or a custom filter that you've set up within the product feed.
Operator
The condition applied to the filter. Supported operators include:
eq
: equal to
eq
: equal togt
: greater than
gt
: greater thanlt
: less than
lt
: less thange
: greater than or equal to
ge
: greater than or equal tole
: less than or equal to
le
: less than or equal toin
: membership in a list
in
: membership in a listValue
The specific value(s) to filter on. The eq
and in
operators can support multiple values, while the others support a single value.
Standard filters
Criteo supports the following standard filters out of the box. These filters are pulled directly from the corresponding fields in the product feed.
- brand
- price
- rating
For other custom filters, they need to be configured at the product feed level within thefilters
field.
Please refer to the Criteo Feed Parameters page for more details.
Examples
Single filter
filters=(price,le,500)
: Only allow products that are less than or equal to $500.filters=(color,eq,blue)
: Only allow products whose value for the "color" custom filter is "blue".filters=(brand,in,sony,hp,dell)
: Only allow products from the brands Sony, HP, or Dell.
Multiple filters
filters=(brand,in,sony,hp,dell),(price,lt,500)
: Only allow products from the brands Sony, HP, or Dell that also cost less than $500.filters=(price,ge,100),(price,le,500)
: Only allow products with a price between $100 and $500, inclusive.
Sample API call
curl -X GET "https://d.us.criteo.com/delivery/retailmedia" \
--data-urlencode "criteo-partner-id=12345" \
--data-urlencode "environment=d" \
--data-urlencode "retailer-visitor-id=a1b2c3d4e5" \
--data-urlencode "customer-id=123456789" \
--data-urlencode "page-id=viewSearchResult_API_desktop" \
--data-urlencode "event-type=viewCategory" \
--data-urlencode "keywords=black laptops" \
--data-urlencode "item=123|456|789" \
--data-urlencode "page-number=1" \
--data-urlencode "filters=(price,le,500)" \
-H "Referer: https://www.criteo.com" \
-H "X-Forwarded-For: 123.456.789.012" \
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
In this example, the filter filters=(price,le,500)
is applied, meaning only products that are less than or equal to $500 (based on the product feed) will be considered.
Updated 3 months ago