API Usage Constraints
Input and Output Throttling
To ensure good performance, all accounts are limited to 100 reads per minute and 60 writes per minute. This limit is enforced programmatically by the API on a member level. That means if there are two API users for a single member, they will share the throttling limit (i.e., two users can average 50 read per minute each, four users can average 25 reads per minute each). If you require more reads or writes per minute, please reach out to your AppNexus account representative.
Every response from the API will contain a
dbg parameter, which contains information about the API call and response. Below is an example of this debug output as well as the definitions of the fields.
Debug Field Definitions
The API machine which processed the request.
Whether or not the API machine ran SQL queries on a database slave.
The database the query was executed on.
The number of reads made.
The limit on the number of reads.
The time period over which the read_limit is enforced.
The number of writes made.
The limit on the number of writes.
The time period over which the write_limit is enforced.
The amount of time it took to process the API request, expressed in milliseconds.
The UNIX timestamp of the start time of processing, including milliseconds (listed on the right side of the decimal point).
The version of the API.
The maximum number of objects that can be returned in a given GET response is 100. To retrieve more than 100 objects, you can paginate results by specifying
num_elements in the query string of the GET request. For example, the following request would return the first 50 objects in the response:
To retrieve the next 50, you would simply set
- The first element is element 0.
- All GET responses will have a "count" property showing the total number of elements matching that GET request.
- This will also apply to non-reporting services, such as the creative search service, that are requested with methods other than GETs.
After authenticating, your token remains valid for 2 hours. You do not need to re-authenticate within this time. If you do re-authenticate, please note the following limitation: The AppNexus API permits you to authenticate successfully 10 times per 5-minute period. Any subsequent authentication attempts within those 5 minutes will result in an error.
It is best practice to listen for the "NOAUTH" error_id in your call responses and re-authenticate only after receiving it.
AppNexus limits the number of non-expired creatives that you can have on the platform. In addition, AppNexus limits the number of domains that can be used in a single domain list and the number of certain targets that can be used in a single profile. For all object types except creatives, both active and inactive objects are counted against the limit. For creatives, only non-expired objects are counted against the limit. A creative expires when it has neither served nor been modified in 45 days.