Skip to content

cities ​

4 endpoints at a glance
MethodPathSummary
GET/cities/List Cities
GET/cities/{geoname_id}/Get City
GET/cities/{geoname_id}/probes/List City Probes
GET/cities/countries/List Country Counts

cities​


List Cities​

GET
/cities/

Paginated city search.

All filters optional + AND-combined. q matches against
name or asciiname as a case-insensitive prefix.
Population-DESC sort. Returns
{rows, total, limit, offset} so the frontend can render
a standard "1–25 of 4,723" footer.

Parameters​

Query Parameters

q
country
min_population
limit
Type
integer
Maximum
200
Minimum
1
Default
25
offset
Type
integer
Minimum
0
Default
0

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


List Country Counts​

GET
/cities/countries/

Distinct cca2s actually present in db.geonames_cities +
a count of cities per country. Drives the lookup view's
country-filter dropdown so operators only see countries that
will produce a non-empty result set.

Responses​

Successful Response

application/json
JSON
[
  
{
  
  
"additionalProperties": "string"
  
}
]

Playground​

Samples​


Get City​

GET
/cities/{geoname_id}/

Single-city detail by geonameid.

Bundles the city row + nearest (top-10 closest other
cities for the in-page browse list) + probes_count (so
the detail view can label its probe table without a fourth
round-trip).

Parameters​

Path Parameters

geoname_id*
Type
integer
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


List City Probes​

GET
/cities/{geoname_id}/probes/

Probes located in this city via enrichments.city.

Capped at 100 rows server-side; the city-detail view shows
"showing first 100" + a link to the probe-list filtered to
the city for the truncated case.

Parameters​

Path Parameters

geoname_id*
Type
integer
Required

Query Parameters

limit
Type
integer
Default
100

Responses​

Successful Response

application/json
JSON
[
  
{
  
  
"additionalProperties": "string"
  
}
]

Playground​

Variables
Key
Value

Samples​


Atlas — built on RIPE Atlas data.