Skip to main content
POST
Get City Information

Request contract

  • Method and path: POST /apis/v1/api-ninjas/get-city
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/api-ninjas/get-city
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
country
string

ISO-3166 alpha-2 country code to filter cities (e.g., 'US', 'GB', 'JP').

Examples:

"US"

"GB"

"JP"

limit
integer

Number of results to return per request (range: 1-30). Premium feature only.

Required range: 1 <= x <= 30
max_lat
number

Maximum latitude coordinate for geographic filtering (range: -90 to 90).

Required range: -90 <= x <= 90
max_lon
number

Maximum longitude coordinate for geographic filtering (range: -180 to 180).

Required range: -180 <= x <= 180
max_population
integer

Maximum population count for filtering cities.

Required range: x >= 0
min_lat
number

Minimum latitude coordinate for geographic filtering (range: -90 to 90).

Required range: -90 <= x <= 90
min_lon
number

Minimum longitude coordinate for geographic filtering (range: -180 to 180).

Required range: -180 <= x <= 180
min_population
integer

Minimum population count for filtering cities.

Required range: x >= 0
name
string

City name to search for (e.g., 'London', 'New York').

Examples:

"London"

"Tokyo"

offset
integer

Pagination offset to skip the first N results.

Required range: x >= 0

Response

Tool result data

details
object[]
required