{"coordinates":"43.6534817, -79.3839347"}
curl --location --request GET 'https://zylalabs.com/api/1246/coordinates+by+city+name+api/1071/fetch+coordinates+by+city?city=Toronto' --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 Coordinates By City Name 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 commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
Trusted by leading companies
The Coordinates by City Name API is a simple yet powerful tool for developers who need to retrieve the latitude and longitude coordinates for a given city name. This API is designed to be easy to use and provides fast and accurate results, making it an ideal solution for a wide range of applications and services.
The API can be integrated into any app or website that requires geographic information, such as weather apps, mapping apps, and travel apps. By providing the API with a city name, developers can quickly retrieve the corresponding coordinates, which can then be used for a variety of purposes. For example, the coordinates can be used to display the city on a map, to perform distance calculations, or to retrieve information about the local weather or time zone.
The API is built on reliable and up-to-date geographic data, ensuring that the results are accurate and relevant.
What your API receives and what your API provides (input/output)?
It will receive a parameter and provide you with a JSON.
Mapping applications: Integrating the API into a mapping application to display the location of a city on a map.
Geolocation-based services: Utilizing the API to determine the location of a user and deliver personalized content or recommendations.
Delivery and transportation services: Incorporating the API to calculate distances between cities for delivery and transportation services.
Weather applications: Using the API to retrieve the coordinates for a city and retrieve information about the local weather conditions.
Emergency services: Integrating the API into emergency services applications to quickly determine the location of an incident.
Event management: Using the API to determine the location of events and provide attendees with driving directions or public transportation options.
Logistics and supply chain management: Utilizing the API to determine the location of suppliers, warehouses, and delivery destinations.
Real estate and property management: Integrating the API into real estate applications to display the location of properties on a map.
Geotagging: Incorporating the API into photo or video applications to add geographic information to media files.
Basic Plan: 1,000 API Calls.
Pro Plan: 3,000 API Calls.
Pro Plus Plan: 5,000 API Calls.
Premium Plan: 10,000 API Calls.
The Fetch Coordinates By City endpoint returns latitude and longitude coordinates for a specified city name in a structured JSON format. The response includes the coordinates as a string, allowing easy integration into mapping and geolocation applications.
The key field in the response data is "coordinates," which contains the latitude and longitude values in a comma-separated format (e.g., "43.6534817, -79.3839347"). This allows developers to easily extract and utilize geographic information.
The response data is organized in JSON format, with a single key-value pair. The key is "coordinates," and the value is a string representing the latitude and longitude. This simple structure facilitates quick parsing and integration into applications.
The endpoint provides geographic coordinates (latitude and longitude) for cities worldwide. It is useful for applications requiring location data, such as mapping, weather, and geolocation services.
The Coordinates By City Name API utilizes reliable and up-to-date geographic data sources to ensure accuracy. The data is regularly maintained to reflect changes in geographic information, enhancing the quality of the results.
Users can customize their requests by specifying the city name as a parameter in the API call. This allows for targeted queries to retrieve coordinates for specific locations, making it adaptable for various applications.
Typical use cases include mapping applications, weather services, geolocation-based content delivery, logistics planning, and emergency response systems. The coordinates can enhance user experience by providing location-specific information.
If the API returns partial or empty results, developers should implement error handling to manage such cases. This may include displaying a user-friendly message, prompting for a different city name, or logging the issue for further investigation.
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