Bidders - Country service
Article 01/16/2025
4 contributors
Feedback
In this article
REST API
JSON fields
Examples
The read-only Country Service allows you to see information about the countries or regions registered in the Xandr system. You can use this service to retrieve the IDs for targeting in profiles .
Expand table
Expand table
Field
Type
Description
code
enum
The ISO code for the country or region.
id
int
The ID of the country or region.
name
string
The name of the country or region.
View all countries or regions
$ curl -b cookies -c cookies 'https://api.adnxs.com/country'
{
"response": {
"status": "OK",
"count": 250,
"start_element": null,
"num_elements": null,
"countries": [
{
"id": 1,
"name": "Anonymous Proxy",
"code": "A1"
},
{
"id": 2,
"name": "Satellite Provider",
"code": "A2"
},
{
"id": 3,
"name": "Other Country",
"code": "O1"
},
...
],
"dbg_info": {
...
}
}
}
View a specific country or region by ID
$ curl -b cookies -c cookies 'https://api.adnxs.com/country?id=59'
{
"response": {
"status": "OK",
"count": 1,
"start_element": null,
"num_elements": null,
"country": {
"id": 59,
"name": "Germany",
"code": "DE"
},
"dbg_info": {
...
}
}
}
View a specific country or region by code
$ curl -b cookies -c cookies 'https://api.adnxs.com/country?code=DE'
{
"response": {
"status": "OK",
"count": 1,
"start_element": null,
"num_elements": null,
"countries": [
{
"id": 59,
"name": "Germany",
"code": "DE"
}
],
"dbg_info": {
...
}
}
}
View all countries or regions that contain "United" in their names
$ curl -b cookies -c cookies 'https://api.adnxs.com/country?like_name=United'
{
"response": {
"status": "OK",
"count": 5,
"start_element": null,
"num_elements": null,
"countries": [
{
"id": 5,
"name": "United Arab Emirates",
"code": "AE"
},
{
"id": 80,
"name": "United Kingdom",
"code": "GB"
},
{
"id": 229,
"name": "Tanzania, United Republic of",
"code": "TZ"
},
{
"id": 232,
"name": "United States Minor Outlying Islands",
"code": "UM"
},
{
"id": 233,
"name": "United States",
"code": "US"
}
],
"dbg_info": {
...
}
}
}