The Location Database API is a dependable tool crafted to deliver precise city listings based on any country name. Whether you're developing a travel application, managing logistics, or building location-aware features, this API offers a core building block for incorporating geographic information into your solutions.
Businesses and developers alike can leverage this API to enrich user interactions through location-based functionality. For example, when a user selects their country, a real-time list of cities can be presented—streamlining onboarding, enhancing personalization, or enabling advanced filtering. Ideal for smart form completion, geographic segmentation, regional data insights, and responsive UI elements like dynamic dropdowns.
["Belišće","Bjelovar","Buzet","Cakovec","Crikvenica","Daruvar","Dubrovnik","Gospic","Gradac","Jastrebarsko","Karlovac","Kaštela","Koprivnica","Krk","Kutina","Makarska","Metkovic","Nova Gradiska","Ogulin","Opatija","Osijek","Petrinja","Porec","Pula","Rijeka","Rovinj","Samobor","Sesvete","Sibenik","Sisak","Slavonski Brod","Solin","Split","Umag","Varazdin","Velika Gorica","Vinkovci","Virovitica","Vukovar","Zadar","Zagreb","Zapresic","Zupanja","Đakovo"]
curl --location --request GET 'https://pr197-testing.zylalabs.com/api/6424/location+database+api/9223/cities+by+country?country=Croatia' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
This endpoint returns a list of cities associated with a specified country. Each city entry typically includes details such as the city name, population, and geographical coordinates, providing comprehensive geographic information for integration into applications.
The response data includes key fields such as "city_name," "population," and "coordinates." These fields provide essential information for developers to utilize in location-based features and applications.
The response data is structured in a JSON format, with an array of city objects. Each object contains fields for city details, making it easy to parse and integrate into applications for dynamic user experiences.
The primary parameter for this endpoint is the "country" name. Users must specify the exact name of the country to retrieve the corresponding list of cities, ensuring accurate data retrieval.
Typical use cases include travel applications displaying city options for users, logistics platforms optimizing routes based on city locations, and forms that require users to select their city for personalized experiences.
Data accuracy is maintained through regular updates and validation against reliable geographic databases. Quality checks are implemented to ensure that city listings are current and reflect real-world changes.
Users can utilize the returned data by integrating it into dropdown menus for city selection, enhancing user onboarding processes, or employing it for geographic segmentation in marketing strategies.
If users receive partial or empty results, they should verify the country name for accuracy. Additionally, they can implement fallback mechanisms in their applications, such as suggesting nearby countries or cities based on user input.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
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.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
351ms
Service Level:
100%
Response Time:
446ms
Service Level:
100%
Response Time:
105ms
Service Level:
100%
Response Time:
123ms
Service Level:
100%
Response Time:
4,407ms
Service Level:
100%
Response Time:
1,614ms
Service Level:
100%
Response Time:
80ms
Service Level:
100%
Response Time:
455ms
Service Level:
100%
Response Time:
118ms
Service Level:
100%
Response Time:
223ms