Requesting raw ad data for Android and iOS

How to request campaigns from Appnext API?

Request API base URL:

https://global.appnext.com/offerWallApi.
aspx?pimp=1&tid=API&did=Advertising_ID&id=Placement_ID

API request Parameters:

ParameterDescriptionExampleNotes
tid Appnext tool - should be always API&tid=APIMandatory, do not change this
parameter value
id Placement ID - a 32-character string
generated by Appnext for every
registered app/mobile-web app that
is required for all inbound requests
&id=0fa643ba-a3e5-4f01-
bf49-89354fbd0562
Mandatory
did Google Advertising ID (GAID) OR
iOS (IDFA).
A 32-characters string
&did=aaaaaaaa-bbbbcccc-
1111-222222220000
Mandatory
cnt The number of campaigns received
in the API response
&cnt=20If not added to the call, the default will be cnt=1
pimp=1 Count an impression whenever
an campaigns “pixel_imp” link is
loaded.
&pimp=1Once added to the call, a new field will appear - "pixelImp"
pbk Postback parameters.&pbk=yourpostback
parameters
Optional. Passing a pbk parameter
will add a value ("q") to all urlApp fields
in the returned campaigns
lockcat Getting campaigns under specific
Google Play categories
&lockcat=cardsOptional. If you would like to add several categories, please use encode
ip The client Ip address&ip=192.168.2.6This is mandatory for server side
integration. It’s important not to
send the server IP
User-agent The user agent of the browser&uagent= Dalvik%2f2.1.0+(Li
nux%3b+U%3b+Android+9%
3b+Redmi+Note+7+Pro+MI
UI%2fV10.3.9.0.PFHINXM)
This is mandatory for server side
integration
s2s=1 This parameter indicates for a server-to-server integration&s2s=1This is manadatory for s2s integrations. Adding this to the API call will add a new field in the JSON response - "market_url"
spYou can pass the package name of the advertiser that you would like to receive an offer for - In addition, we can receive other offers for packages in the same category&sp=com.zhiliaoapp.musicallyOptional

An example of an API call -

https://global.appnext.com/offerWallApi.aspx?tid=API&did=aaaaaaaa-bbbb-cccc-1111-222222220000&id=xxxxxxxxxxxx-xxxxx-xxxx-xxxxxxxxxxxx&pimp=1&cnt=10&pbk=YOUR_DATA&cat=Action,Brain&s2s=1&ip=192.168.2.1&&uagent=
Dalvik%2f2.1.0+(Linux%3b+U%3b+Android+9%3b+Redmi+Note+7+Pro+MIUI%2fV10.3.9.0.PFHINXM)

🚧

Important Notes

  1. Each parameter added to the API string should be added with the “&” symbol.
    This symbol is used in order to differentiate one parameter from another.

  2. When using multiple categories, make sure to use the following format:
    app_category,app_category,app_category
    Categories with 2 words, for example - Arcade & Action must be encoded in
    the following format: Arcade%20%26%20Action

  3. Make sure to perform a new API call whenever you want to load an ad.
    Avoid making any client-side caching of the API response.

  4. Each campaign includes a Campaign ID and a Banner ID. If an app is
    promoted by several advertisers, Appnext API will only return the campaign
    with the highest bid, for the asked GEO.
    The Campaign ID may also change in case the advertiser chooses to A/B
    test several creative. If the Campaign ID and/or the Banner ID has changed
    from one API call to the next, make sure to replace all returned parameters
    (including image and tracking links) and serve the most recent banner.