Region and city names
GET
/v1/geo/{type}/names
const url = 'https://restapi.affattr.com/v1/geo/region/names?countries%5B%5D=example&page=1&limit=100';const options = {method: 'GET', headers: {'API-KEY': '<API-KEY>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” type
required
string
Kind of names
Query Parameters
Section titled “Query Parameters ” countries[]
required
Array<string>
Countries, ISO 3166-1 alpha-2
search
string
Substring of the name
page
integer
Page, from 1
limit
integer
Names per page, at most 1000
Responses
Section titled “ Responses ”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"}