Designated Market Area Service

The read-only Designated Market Area (DMA) Service allows you to retrieve the IDs of designated market areas for targeting in campaigns (see dma_targets in the Profile Service).

REST API

View all designated market areas:
GET https://api.appnexus.com/dma

View a specific designated market area:
GET https://api.appnexus.com/dma?id=ID
GET https://api.appnexus.com/dma?name=NAME

View all designated market areas in a specific state:
GET https://api.appnexus.com/dma?like_name=XX
where XX is the state code

Find out which fields you can filter and sort by:
GET https://api.appnexus.com/dma/meta

JSON Fields

Field

Type

Description

id

int

The ID of the DMA.

name

string

The name of the DMA.

codestringThe code of the DMA.
country_idintThe ID of the country to which the DMA belongs. You can use the Country Service to retrieve a complete list of country IDs.
country_namestringThe name of the country to which the DMA belongs. You can use the Country Service to retrieve a complete list of country names.

country_code

string

The ISO code for the country to which the DMA belongs. You can use the Country Service to retrieve a complete list of country codes.

active

Boolean

If true, the DMA is available for targeting. If false, there is no geolocation data for the DMA and so delivery is not possible.

For more information, see How AppNexus Geography Targeting Works.

Examples

View all designated market areas
{code}
$ curl -b cookies -c cookies 'https://api.appnexus.com/dma'

{
    "response": {
        "status": "OK",
        "count": 211,
        "start_element": null,
        "num_elements": null,
        "dmas": [
            {
                "id": 500,
                "code": 500,
                "name": "Portland-Auburn ME",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 501,
                "code": 501,
                "name": "New York NY",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 502,
                "code": 502,
                "name": "Binghamton NY",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 503,
                "code": 503,
                "name": "Macon GA",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 504,
                "code": 504,
                "name": "Philadelphia PA",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 505,
                "code": 505,
                "name": "Detroit MI",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            {
                "id": 506,
                "code": 506,
                "name": "Boston MA-Manchester NH",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true,
                "last_modified": "2013-02-15 14:16:07"
            },
            ...
        ]
    }
}
{code}