Skip to end of metadata
Go to start of metadata

City Service

The read-only City Service allows you to see information about the cities registered in the AppNexus system, including the region, designated market area, and country to which each city belongs. You can use this service to retrieve the IDs of cities for targeting in campaigns (see city_targets in the Profile Service).

On This Page

REST API

View all cities:

View all cities in a specific country:

View all cities in a specific designated market area:

View a specific cities:

Find out which fields you can filter and sort by:

JSON Fields

Field

Type

Description

id

int

The ID of the city.

name

string

The name of the city.

country_idintThe ID of the country to which the city belongs. You can use the Country Service to retrieve a complete list of country IDs.
country_namestringThe name of the country to which the city 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 city belongs. You can use the Country Service to retrieve a complete list of country codes.

region_idintThe ID of the region to which the city belongs. You can use the Region Service to retrieve a complete list of region IDs.

region_name

string

The name of the region to which the city belongs. You can use the Region Service to retrieve a complete list of region names.

region_codestringThe ISO or FIPS code for the region to which the city belongs. You can use the Region Service to retrieve a complete list of region codes.
dma_idintThe ID of the designated market area to which the city belongs. You can use the Designated Market Area Service to retrieve a complete list of DMA IDs.

dma_name

string

The name of the designated market area to which the city belongs. You can use the Designated Market Area Service to retrieve a complete list of DMA names.

active

Boolean

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

For more information, see How AppNexus Geography Targeting Works.

Examples

View all cities in Germany
View all cities in the Bayern region of Germany
View all cities named "Karlsruhe"