countries

This helper method will return the ids and names of the different countries in Adbeat’s database.

Note: IDs returned by this method are subject to change at any time. So it’s best not to "hardcode" these IDs into your applications.
Request Cost: 1 unit, Result Cost: none

URL Format

http://api.adbeat.com/v3/{api-key}/countries
http://api.adbeat.com/v3/{api-key}/countries/{countryId}

Parameters

Parameter Name Meaning Default Value Notes
countryId filter (no filtering) Returns results for this specific country.

Return Fields

Field Name Example Notes
countryId de ID used for other API requests.
countryName Germany User-friendly name for display in UI.
apiUnits 1 The number of API units consumed by this request.

Usage Example(s)

To get a list of all ad types do this:

http://api.adbeat.com/v3/{api-key}/countries

JSON Response

{
    "statusCode": 200,
    "numHits": 22,
    "hits": [{
        "countryId": "at",
        "countryName": "Austria"
    }, {
        "countryId": "au",
        "countryName": "Australia"
    }, {
        "countryId": "br",
        "countryName": "Brazil"
    }, {
        "countryId": "ca",
        "countryName": "Canada"
    }, {
        "countryId": "ch",
        "countryName": "Switzerland"
    }, {
        "countryId": "cn",
        "countryName": "China"
    }, {
        "countryId": "de",
        "countryName": "Germany"
    }, {
        "countryId": "es",
        "countryName": "Spain"
    }, {
        "countryId": "fr",
        "countryName": "France"
    }, {
        "countryId": "gb",
        "countryName": "United Kingdom"
    }, {
        "countryId": "hk",
        "countryName": "Hong Kong"
    }, {
        "countryId": "il",
        "countryName": "Israel"
    }, {
        "countryId": "it",
        "countryName": "Italy"
    }, {
        "countryId": "jp",
        "countryName": "Japan"
    }, {
        "countryId": "mx",
        "countryName": "Mexico"
    }, {
        "countryId": "nl",
        "countryName": "Netherlands"
    }, {
        "countryId": "ru",
        "countryName": "Russia"
    }, {
        "countryId": "za",
        "countryName": "South Africa"
    }, {
        "countryId": "se",
        "countryName": "Sweden"
    }, {
        "countryId": "sg",
        "countryName": "Singapore"
    }, {
        "countryId": "tr",
        "countryName": "Turkey"
    }, {
        "countryId": "us",
        "countryName": "United States"
    }],
    "apiUnits": 1,
    "statusMsg": "successful countries request",
    "requestParameters": {},
    "handler": "countries"
}

You can also get the name of a specific country by passing the countryId like this:

http://api.adbeat.com/v3/{api-key}/countries/de

JSON Response

{
    "statusCode": 200,
    "numHits": 1,
    "hits": [{
        "countryId": "de",
        "countryName": "Germany"
    }],
    "apiUnits": 1,
    "statusMsg": "successful countries/de request",
    "requestParameters": {
        "countryId": "de"
    },
    "handler": "countries"
}