For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Request

Request Parameters


  • The request is made in JSON format using HTTP POST.

  • It is possible to request many ad zones in a single request. Each zone will have a different ID, as you can see in the example below.

  • You can add keywords to your request that will manually match the ad zone to the type of advertising you want. If there are no keywords, the URL of the site will be used for matching.


User

Below are the parameters used in the request: The Ad Placement API can be called from either client side or server side:

  • Client side: you don't need to pass the user's IP. The API takes it from the connection.

  • Server side: pass the user's IP in the ip parameter, so that ads are targeted to the user rather than to your server's location.

  • For client-side requests, you can send Content-Type: text/plain to avoid a browser pre-flight request.

Parameter
Description

id

The ID of the user

ip

The user IP address

ua

The User Agent: A string containing the user's browser/app and device/OS

language

Sets the language of the request using the standard two-character ISO code plus an optional 2-character region code. e.g. en-us for United States English

referer

The address of the site where the ad will be shown

el

The Base64-encoded email of the user

gdpr

Privacy advised extensions (Optional)

buyeruids

List of buyer uids* (Optional)

* json_encoded and then base64_encoded array

Example

user.gdpr

Parameter
Description

gdpr

This should be 0 if the caller believes that the user is not under GDPR, and 1 if the user is under GDPR .

consent

This is the consent string required by the IAB Standards.

Zones

Parameter
Description

id

The ID of the ad zone

sub

The Sub ID of the ad zone (optional)

sub2

Additional Sub ID (optional). See Using Additional Sub IDs.

sub3

Additional Sub ID (optional). See Using Additional Sub IDs.

keywords

You can insert keywords into the code in your ad zone to manually match it to the type of advertising you want (optional).

block_ad_types

Comma-separated list of ad types to block for this request (optional). See Block Ad Types.

custom_targeting

If Custom Targeting is available, will filter campaigns based on the key/value structure provided. {"custom_targeting": {"ex_car-brand": "mercedes", "ex_age-group": "25-34"}}

Last updated

Was this helpful?