Skip to content

Region and city names

GET
/v1/geo/{type}/names
curl --request GET \
--url 'https://restapi.affattr.com/v1/geo/region/names?countries%5B%5D=example&page=1&limit=100' \
--header 'API-KEY: <API-KEY>'

Names of the regions or cities of the countries, the values the region and city filters of the reports take. Client API key only.

type
required
string
Allowed values: region city

Kind of names

countries[]
required
Array<string>

Countries, ISO 3166-1 alpha-2

search
string

Substring of the name

page
integer
default: 1

Page, from 1

limit
integer
default: 100

Names per page, at most 1000

Names

Media type application/json
object
data
object
names
Array<string>
pagination
object
next_page
integer
page
integer
per_page
integer
total_count
integer
Example generated
{
"data": {
"names": [
"example"
]
},
"pagination": {
"next_page": 1,
"page": 1,
"per_page": 1,
"total_count": 1
}
}

Bad request

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

No credentials (answered with 403 until default-deny is enabled)

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

Invalid credentials or no access

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}

Internal server error

Media type application/json
object
error

What went wrong. 403 always says “Access denied”.

string
request_id

Id of the request, to quote to support.

string
Example
{
"error": "Access denied",
"request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"
}