Skip to main content
POST
Convert City to Coordinates

Request contract

  • Method and path: POST /apis/v1/api-ninjas/get-geocoding
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/api-ninjas/get-geocoding
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.00089 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
city
string
required

City name to geocode. Required parameter for converting a city location to latitude and longitude coordinates.

Examples:

"London"

"New York"

"Tokyo"

country
string

Optional 2-letter ISO 3166 alpha-2 country code to narrow down the search (e.g., 'GB' for United Kingdom, 'US' for United States). Useful when multiple cities share the same name.

Examples:

"GB"

"US"

"JP"

state
string

Optional US state name or abbreviation to narrow down the search. Only applicable for cities in the United States (e.g., 'California' or 'CA').

Examples:

"California"

"CA"

"NY"

Response

Tool result data

details
object[]
required