With this API you can obtain statistics about the world's cities, regions, and nations. Filter cities by prefix of their names, nation, location, time zone, and even minimum population (currently over 500,000 towns, cities, and counties). Show the findings in several languages and sort by population, elevation, name, country code, or any combination of these. Industry standard practices are followed by RESTful API, including HATEOAS-style links to help page results.
GobalDB API is the perfect tool for obtaining information about cities, regions and countries. With this API you can, for example: retrieve and update records in Global Data, perform CRUD operations on single or multiple Global Data Table records at once, clear an entire Global Data Table, list the accessible Global Data structures available to the Global Data API, and many more things.
The information obtained is (among many more):
Filter by optional criteria to find administrative divisions. If no criteria are specified, all known divisions with a population of at least 1000 will be returned.
Free plans have a limit of 10 results per query.
Endpoint JSON response example:
{
"data": [
{
"id": 170760,
"wikiDataId": "Q306343",
"name": "Abbeville County",
"country": "United States of America",
"countryCode": "US",
"region": "South Carolina",
"regionCode": "SC",
"latitude": 34.23,
"longitude": -82.45,
"population": 24932
},
{
"id": 170276,
"wikiDataId": "Q337402",
"name": "Acadia Parish",
"country": "United States of America",
"countryCode": "US",
"region": "Louisiana",
"regionCode": "LA",
"latitude": 30.266666666,
"longitude": -92.4,
"population": 62577
},
{
"id": 171067,
"wikiDataId": "Q49289",
"name": "Accomack County",
"country": "United States of America",
"countryCode": "US",
"region": "Virginia",
"regionCode": "VA",
"latitude": 37.76,
"longitude": -75.76,
"population": 32973
},
Object | Description |
---|---|
maxPopulation |
[Optional] Only divisions having no more than this population |
countryIds |
[Optional] Only divisions in these countries (comma-delimited country codes or WikiData ids). CountryIds can be found onΒ https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements |
minPopulation |
[Optional] Only divisions having at least this population |
{"data":[{"id":3386644,"wikiDataId":"Q3694483","name":"Ab Band District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","latitude":32.983,"longitude":67.967,"population":0},{"id":3228129,"wikiDataId":"Q1650529","name":"Achin","country":"Afghanistan","countryCode":"AF","region":"Nangarhar","regionCode":"NAN","latitude":34.0894,"longitude":70.683,"population":0},{"id":3223788,"wikiDataId":"Q2674014","name":"Ajristan District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","latitude":33.466962,"longitude":67.238846,"population":0},{"id":3382471,"wikiDataId":"Q2830672","name":"Alasay","country":"Afghanistan","countryCode":"AF","region":"Kapisa","regionCode":"KAP","latitude":34.925555555,"longitude":69.809166666,"population":0},{"id":3348637,"wikiDataId":"Q1229725","name":"Alingar","country":"Afghanistan","countryCode":"AF","region":"Laghman","regionCode":"LAG","latitude":34.8347,"longitude":70.3603,"population":0}],"links":[{"rel":"first","href":"/v1/geo/cities?offset=0&limit=5"},{"rel":"next","href":"/v1/geo/cities?offset=5&limit=5"},{"rel":"last","href":"/v1/geo/cities?offset=68820&limit=5"}],"metadata":{"currentOffset":0,"totalCount":68823}}
curl --location --request GET 'https://zylalabs.com/api/18/gobaldb+api/71/administrative+divisions' --header 'Authorization: Bearer YOUR_API_KEY'
Get information on a certain administrative division, such as its location, population, and elevation above sea level (if available).
Object | Description |
---|---|
DATA |
[Required] |
{"data":[{"id":3386644,"wikiDataId":"Q3694483","name":"Ab Band District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","latitude":32.983,"longitude":67.967,"population":0},{"id":3228129,"wikiDataId":"Q1650529","name":"Achin","country":"Afghanistan","countryCode":"AF","region":"Nangarhar","regionCode":"NAN","latitude":34.0894,"longitude":70.683,"population":0},{"id":3223788,"wikiDataId":"Q2674014","name":"Ajristan District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","latitude":33.466962,"longitude":67.238846,"population":0},{"id":3382471,"wikiDataId":"Q2830672","name":"Alasay","country":"Afghanistan","countryCode":"AF","region":"Kapisa","regionCode":"KAP","latitude":34.925555555,"longitude":69.809166666,"population":0},{"id":3348637,"wikiDataId":"Q1229725","name":"Alingar","country":"Afghanistan","countryCode":"AF","region":"Laghman","regionCode":"LAG","latitude":34.8347,"longitude":70.3603,"population":0}],"links":[{"rel":"first","href":"/v1/geo/cities?offset=0&limit=5&divisionId=Q2670909"},{"rel":"next","href":"/v1/geo/cities?offset=5&limit=5&divisionId=Q2670909"},{"rel":"last","href":"/v1/geo/cities?offset=68820&limit=5&divisionId=Q2670909"}],"metadata":{"currentOffset":0,"totalCount":68823}}
curl --location --request GET 'https://zylalabs.com/api/18/gobaldb+api/72/administrative+divisions+details&DATA=Required' --header 'Authorization: Bearer YOUR_API_KEY'
Find cities based on criteria. If no criteria, you will get all known cities with a population over 1000.
Object | Description |
---|---|
location |
[Optional] Only cities near this location. Latitude/longitude in ISO-6709 format: Β±DD.DDDDΒ±DDD.DDDD |
limit |
[Optional] The maximum number of results to retrieve |
minPopulation |
[Optional] Only cities having at least this population |
sort |
[Optional] How to sort the results. Format: Β±SORTFIELD,Β±SORTFIELD where SORT_FIELD = countryCode | elevation | name | population |
languageCode |
[Optional] Display results in this language |
types |
[Optional] Only cities for these types (comma-delimited): CITY | ADM2 |
timeZoneIds |
[Optional] Only cities in these time-zones |
countryIds |
[Optional] Only cities in these countries (comma-delimited country codes or WikiData ids) |
{"data":[{"id":3350606,"wikiDataId":"Q24668","type":"CITY","city":"Aixirivall","name":"Aixirivall","country":"Andorra","countryCode":"AD","region":"Sant JuliΓ de LΓ²ria","regionCode":"06","latitude":42.46245,"longitude":1.50209,"population":0},{"id":3216144,"wikiDataId":"Q24656","type":"CITY","city":"Aixovall","name":"Aixovall","country":"Andorra","countryCode":"AD","region":"Sant JuliΓ de LΓ²ria","regionCode":"06","latitude":42.47635833,"longitude":1.48949167,"population":0},{"id":3406038,"wikiDataId":"Q4699394","type":"CITY","city":"AixΓ s","name":"AixΓ s","country":"Andorra","countryCode":"AD","region":"Sant JuliΓ de LΓ²ria","regionCode":"06","latitude":42.48638889,"longitude":1.46722222,"population":0},{"id":397,"wikiDataId":"Q1863","type":"CITY","city":"Andorra la Vella","name":"Andorra la Vella","country":"Andorra","countryCode":"AD","region":"Andorra la Vella","regionCode":"07","latitude":42.5,"longitude":1.5,"population":22151},{"id":3360277,"wikiDataId":"Q24475","type":"CITY","city":"Ansalonga","name":"Ansalonga","country":"Andorra","countryCode":"AD","region":"Ordino","regionCode":"05","latitude":42.568443,"longitude":1.521571,"population":0}],"links":[{"rel":"first","href":"/v1/geo/cities?offset=0&limit=5"},{"rel":"next","href":"/v1/geo/cities?offset=5&limit=5"},{"rel":"last","href":"/v1/geo/cities?offset=539945&limit=5"}],"metadata":{"currentOffset":0,"totalCount":539950}}
curl --location --request GET 'https://zylalabs.com/api/18/gobaldb+api/73/cities' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the GobalDB API REST API, simply include your bearer token in the Authorization header.
Header | Description |
---|---|
Authorization
|
[Required] Should be Bearer access_key . See "Your API Access Key" above when you are subscribed. |
No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.
Zyla API Hub is, in other words, an API MarketPlace. An all-in-one solution for your developing needs. You will be accessing our extended list of APIs with only your user. Also, you won't need to worry about storing API keys, only one API key for all our products is needed.
Prices are listed in USD. We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the worldβs most reliable payment companies. If you have any trouble with paying by card, just contact us at [email protected]
Sometimes depending on the bank's fraud protection settings, a bank will decline the validation charge we make when we attempt to be sure a card is valid. We recommend first contacting your bank to see if they are blocking our charges. If more help is needed, please contact [email protected] and our team will investigate further
Prices are based on a recurring monthly subscription depending on the plan selected β plus overage fees applied when a developer exceeds a planβs quota limits. In this example, you'll see the base plan amount as well as a quota limit of API requests. Be sure to notice the overage fee because you will be charged for each additional request.
Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.
Just go to the pricing page of that API and select the plan that you want to upgrade to. You will only be charged the full amount of that plan, but you will be enjoying the features that the plan offers right away.
Yes, absolutely. If you want to cancel your plan, simply go to your account and cancel on the Billing page. Upgrades, downgrades, and cancellations are immediate.
You can contact us through our chat channel to receive immediate assistance. We are always online from 9 am to 6 pm (GMT+1). If you reach us after that time, we will be in contact when we are back. Also you can contact us via email to [email protected]
Service Level:
100%
Response Time:
360ms
Service Level:
100%
Response Time:
1,194ms
Service Level:
100%
Response Time:
87ms
Service Level:
100%
Response Time:
329ms
Service Level:
100%
Response Time:
215ms
Service Level:
100%
Response Time:
180ms
Service Level:
100%
Response Time:
890ms
Service Level:
100%
Response Time:
448ms
Service Level:
100%
Response Time:
819ms
Service Level:
100%
Response Time:
109ms
Service Level:
100%
Response Time:
1,652ms
Service Level:
100%
Response Time:
691ms
Service Level:
100%
Response Time:
5,443ms
Service Level:
100%
Response Time:
589ms
Service Level:
100%
Response Time:
1,712ms
Service Level:
99%
Response Time:
6,609ms
Service Level:
100%
Response Time:
1,642ms
Service Level:
100%
Response Time:
3,225ms