GobalDB API

If you need global city, region, and country data, this is the API for you.

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.

Features:
  • Get Administrative Divisions info: Filter by optional criteria to find administrative divisions data.
  • Get Administrative Divisions Details: Get information on a certain administrative division, such as its location, population, and elevation above sea level (if available).
  • Get Cities data: Find cities’ information based on criteria. 

 

The information obtained is (among many more):

  • Name of division or city.
  • Region and its code.
  • Latitude and longitude.
  • Population.

API Documentation

Endpoints


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
    },


                                                                            
GET https://zylalabs.com/api/18/gobaldb+api/71/administrative+divisions
                                                                            
                                                                        

Administrative Divisions - Endpoint Features

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
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"data":[{"id":3515514,"wikiDataId":"Q4117373","name":"Al Mamzar","country":"United Arab Emirates","countryCode":"AE","region":"Emirate of Dubai","regionCode":"DU","regionWdId":"Q613","latitude":25.309469444,"longitude":55.342811111,"population":0},{"id":3386644,"wikiDataId":"Q3694483","name":"Ab Band District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","regionWdId":"Q180415","latitude":32.983,"longitude":67.967,"population":0},{"id":3339608,"wikiDataId":"Q2572213","name":"Ab Kamari","country":"Afghanistan","countryCode":"AF","region":"Badghis","regionCode":"BDG","regionWdId":"Q172052","latitude":34.925,"longitude":62.901666666,"population":0},{"id":3228129,"wikiDataId":"Q1650529","name":"Achin","country":"Afghanistan","countryCode":"AF","region":"Nangarhar","regionCode":"NAN","regionWdId":"Q178471","latitude":34.0894,"longitude":70.683,"population":0},{"id":3301438,"wikiDataId":"Q2714271","name":"Adraskan District","country":"Afghanistan","countryCode":"AF","region":"Herat Province","regionCode":"HER","regionWdId":"Q182844","latitude":33.705277777,"longitude":61.995555555,"population":0},{"id":3198316,"wikiDataId":"Q3918406","name":"Ahmadabad District","country":"Afghanistan","countryCode":"AF","region":"Paktia Zurmat","regionCode":"PIA","regionWdId":"Q182493","latitude":33.773888888,"longitude":69.339722222,"population":0},{"id":3223788,"wikiDataId":"Q2674014","name":"Ajristan District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","regionWdId":"Q180415","latitude":33.466962,"longitude":67.238846,"population":0},{"id":3382471,"wikiDataId":"Q2830672","name":"Alasay","country":"Afghanistan","countryCode":"AF","region":"Kapisa","regionCode":"KAP","regionWdId":"Q173816","latitude":34.925555555,"longitude":69.809166666,"population":0},{"id":3347217,"wikiDataId":"Q2123756","name":"Ali Abad","country":"Afghanistan","countryCode":"AF","region":"Kunduz","regionCode":"KDZ","regionWdId":"Q186418","latitude":36.53,"longitude":68.877777777,"population":0},{"id":3348637,"wikiDataId":"Q1229725","name":"Alingar","country":"Afghanistan","countryCode":"AF","region":"Laghman","regionCode":"LAG","regionWdId":"Q185442","latitude":34.8347,"longitude":70.3603,"population":0}],"links":[{"rel":"first","href":"/v1/geo/adminDivisions?offset=0&limit=10"},{"rel":"next","href":"/v1/geo/adminDivisions?offset=10&limit=10"},{"rel":"last","href":"/v1/geo/adminDivisions?offset=57130&limit=10"}],"metadata":{"currentOffset":0,"totalCount":57138}}
                                                                                                                                                                                                                    
                                                                                                    

Administrative Divisions - CODE SNIPPETS


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).



                                                                            
GET https://zylalabs.com/api/18/gobaldb+api/72/administrative+divisions+details
                                                                            
                                                                        

Administrative Divisions Details - Endpoint Features

Object Description
DATA [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"data":[{"id":3515514,"wikiDataId":"Q4117373","name":"Al Mamzar","country":"United Arab Emirates","countryCode":"AE","region":"Emirate of Dubai","regionCode":"DU","regionWdId":"Q613","latitude":25.309469444,"longitude":55.342811111,"population":0},{"id":3671889,"wikiDataId":"Q1262899","name":"Dubai Internet City","country":"United Arab Emirates","countryCode":"AE","region":"Emirate of Dubai","regionCode":"DU","regionWdId":"Q613","latitude":25.095,"longitude":55.16,"population":24000},{"id":3386644,"wikiDataId":"Q3694483","name":"Ab Band District","country":"Afghanistan","countryCode":"AF","region":"Ghazni","regionCode":"GHA","regionWdId":"Q180415","latitude":32.983,"longitude":67.967,"population":0},{"id":3339608,"wikiDataId":"Q2572213","name":"Ab Kamari","country":"Afghanistan","countryCode":"AF","region":"Badghis","regionCode":"BDG","regionWdId":"Q172052","latitude":34.925,"longitude":62.901666666,"population":0},{"id":3228129,"wikiDataId":"Q1650529","name":"Achin","country":"Afghanistan","countryCode":"AF","region":"Nangarhar","regionCode":"NAN","regionWdId":"Q178471","latitude":34.0894,"longitude":70.683,"population":0}],"links":[{"rel":"first","href":"/v1/geo/adminDivisions?offset=0&limit=5&data=Q337402"},{"rel":"next","href":"/v1/geo/adminDivisions?offset=5&limit=5&data=Q337402"},{"rel":"last","href":"/v1/geo/adminDivisions?offset=60010&limit=5&data=Q337402"}],"metadata":{"currentOffset":0,"totalCount":60011}}
                                                                                                                                                                                                                    
                                                                                                    

Administrative Divisions Details - CODE SNIPPETS


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.



                                                                            
GET https://zylalabs.com/api/18/gobaldb+api/73/cities
                                                                            
                                                                        

Cities - Endpoint Features

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)
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"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}}
                                                                                                                                                                                                                    
                                                                                                    

Cities - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/18/gobaldb+api/73/cities' --header 'Authorization: Bearer YOUR_API_KEY' 

    

API Access Key & Authentication

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.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.

๐Ÿš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Dedicated account manager
  • Service-level agreement (SLA)

Customer favorite features

  • โœ”๏ธŽ Only Pay for Successful Requests
  • โœ”๏ธŽ Free 7-Day Trial
  • โœ”๏ธŽ Multi-Language Support
  • โœ”๏ธŽ One API Key, All APIs.
  • โœ”๏ธŽ Intuitive Dashboard
  • โœ”๏ธŽ Comprehensive Error Handling
  • โœ”๏ธŽ Developer-Friendly Docs
  • โœ”๏ธŽ Postman Integration
  • โœ”๏ธŽ Secure HTTPS Connections
  • โœ”๏ธŽ Reliable Uptime

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). 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 paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

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.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, look at the โ€˜X-Zyla-API-Calls-Monthly-Remainingโ€™ header. For example, if your plan allows 1000 requests per month and you've used 100, this header will show 900.

To see the maximum number of API requests your plan allows, check the โ€˜X-Zyla-RateLimit-Limitโ€™ header. For instance, if your plan includes 1000 requests per month, this header will display 1000.

The โ€˜X-Zyla-RateLimit-Resetโ€™ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3600, it means 3600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To let you experience our APIs without any commitment, we offer a 7-day free trial that allows you to make API calls at no cost during this period. Please note that you can only use this trial once, so make sure to use it with the API that interests you the most. Most of our APIs provide a free trial, but some may not support it.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, itโ€™s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API trial, you can make only 25% of the calls allowed by that plan. For example, if the API plan offers 1000 calls, you can make only 250 during the trial. To access the full number of calls offered by the plan, you will need to subscribe to the full plan.

 Service Level
100%
 Response Time
360ms

Category:


Related APIs