API Ninjas


Geocoding API

Geocoding API for converting any city from any country to latitude and longitude coordinates
The geocoding API by API Ninjas provides data for the purpose of converting any city from any country to latitude and longitude coordinates. Certain examples of the possible filters are city, state and country, use these to determine the data response. Certain ideas of the type of business who uses the API are geocoding analysts, online map developers, travel and tourism platforms and more, typically the clients might be small business, medium business and enterprises within the map analysis, geolocation, city and country location and more sector. It is usually exciting to read about new programs which use this geocode data, there are a few business cases with the data but a few examples are; website plugins, map applications, city location services, geocoding analysis, travel and location related websites and more. Developers frequently realise new ways to make something with the data from the API system and design new projects. The API has global data coverage available.

Geocoding API endpoints



To use the API system for converting any city from any country to latitude and longitude coordinates, you need to communicate with the API endpoint; /v1/geocoding to obtain a similar response like in the example data output. Using the API key parameter and connecting to it with your private key, you can begin receiving data working with any of the major coding languages. To receive the output required, use the parameters and objects as explained by the table. Put the data endpoint in the URL to make the data request.

Data filtering methods for geocoding API

Below you will find the applicable filter parameters in relation to the geocoding API.

Geocoding API object attributes

Find the objects and their related description using the table to be able to use the API system also make use of the different parameters available to be able to obtain the required response output.
Objects Description
name City name
latitude City latitude
longitude City longitude
country Country

Geocoding output response

On this page clients may find the response example. Opt-in to the full response output because this being limited to make it more readable.
    "name": "London",
    "latitude": 51.5085,
    "longitude": -0.1257,
    "country": "GB"


The data response by the API can be requested as JSON file format and SDKs are accessible by email for all main programming languages such as; phyton, r, matlab, c++, node. Js, go, php, haskell, net, java, javascript, typescript,tensorflow and ruby. Now simply filter the geocoding data with the filter attributes start using the SDKs to build the project.

Geocoding API pricing

In the event that clients wish to get access to the global city location data before signing up, there are sample and trial data sets accessible so write an email and ask for the trial data connection. After clients have worked a bit a little with the the data, you can decide if you wish to buy complete connection to this product.

Cost and price of the API

API Ninjas Geocoding API is accessible with the price tag starting monthly from $9 with 3D secure payment.
Option Price
Monthly subscription From $9/month
Variable pricing no

Free Trial

Free trial is available

Alternative options


Geocode Address API
Geocode Address API by Neutrino is here to offer quality and essential details required to have in building map features, displaying point of interest information on websites, PoI and geolocation analysis, applications, website plugins, travel platforms and websites and more fields. Geocode Address API maintains Location datasets for geocoding an address, partial address or just the name of a place objectives to support businesses globally.


International Street Address Autocomplete API
International Street Address Autocomplete API proposes detailed building map features, location verification, website plugins, geolocation analysis and more data for building apps, web services, tools, software, market inquiries and more. Address data via international street address autocomplete API provides the right information in order to build on point data products.


Us Address Autocomplete API
This US address autocomplete API provides a gigantic volume of Address data together with the entire elements you want. Get connected to the Us Address Autocomplete API provider to start receiving comprehensive data for fetching suggestions that are fully verified USPS addresses purposes right away.


Us Street Address API
Us Street Address API offers data solutions to create products for fetching street address information for US addresses functions. Address data via US street address API output provides the right information to develop advanced online products.


Us Zipcode API
The US zipcode API is the top data tool to straightaway fetch Zip Codes data to your client. Get in touch with the Us Zipcode API provider to directly get detailed data for fetching zip code information for US addresses objectives today.


City Location API
Get in touch with the City Location API provider to directly get precise data for fetching geographic coordinates for the given placename purposes conveniently. This city location API offers a gigantic amount of Cities data with the full elements you need.

Sign up for API Ninjas geocoding API

Get Data Access

~[ ∵ ]~

Sign-up Succesful

Wait for the Data