near string Center point as 'lat,lng' (latitude -90..90, longitude -180..180). Points are sampled uniformly within 'radiusKm' of it and distanceKm is filled in. Mutually exclusive with 'bbox'.
Random geographic coordinates: uniform across the globe (no pole clustering), inside a bounding box, or within a radius of a point — with haversine distances.
Generated test data for fixtures and development
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
near | string | example: 40.7128,-74.006 | Center point as 'lat,lng' (latitude -90..90, longitude -180..180). Points are sampled uniformly within 'radiusKm' of it and distanceKm is filled in. Mutually exclusive with 'bbox'. |
radiusKm | float | allowed: 0.1 – 20000 example: 25 | Disk radius in km around 'near' (0.1–20000). Defaults to 50 when 'near' is set; using it without 'near' is a 400. |
bbox | string | example: 24.5,-125,49.5,-66.9 | Bounding box as 'minLat,minLng,maxLat,maxLng' (min ≤ max, latitudes -90..90, longitudes -180..180). Points are sampled area-uniformly inside it. Mutually exclusive with 'near'. |
near string Center point as 'lat,lng' (latitude -90..90, longitude -180..180). Points are sampled uniformly within 'radiusKm' of it and distanceKm is filled in. Mutually exclusive with 'bbox'.
radiusKm float Disk radius in km around 'near' (0.1–20000). Defaults to 50 when 'near' is set; using it without 'near' is a 400.
bbox string Bounding box as 'minLat,minLng,maxLat,maxLng' (min ≤ max, latitudes -90..90, longitudes -180..180). Points are sampled area-uniformly inside it. Mutually exclusive with 'near'.
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
count | int | default: 10 allowed: 1 – 100 example: 3 | How many records to generate (1–100). |
seed | int | example: 42 | Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed). |
fields | list | example: latitude,longitude | Return only these fields (comma-separated). Mutually exclusive with 'exclude'. |
exclude | list | example: distanceKm | Return all fields except these (comma-separated). |
format | enum | default: json allowed: json | ndjson | csv example: csv | Response format: json envelope, ndjson (one record per line) or csv. |
pretty | boolean | default: false example: true | Pretty-print the JSON response. |
unwrap | boolean | default: false example: true | Drop the envelope: return the raw array/object without data/meta wrapper. |
count int How many records to generate (1–100).
seed int Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).
fields list Return only these fields (comma-separated). Mutually exclusive with 'exclude'.
exclude list Return all fields except these (comma-separated).
format enum Response format: json envelope, ndjson (one record per line) or csv.
pretty boolean Pretty-print the JSON response.
unwrap boolean Drop the envelope: return the raw array/object without data/meta wrapper.
| Field | Type | Description | Example |
|---|---|---|---|
latitude | float | Latitude in decimal degrees (-90..90), rounded to 6 decimals (~0.11 m). | 40.782912 |
longitude | float | Longitude in decimal degrees (-180..180), rounded to 6 decimals. | -73.965355 |
distanceKm nullable | float | Great-circle (haversine, R = 6371 km) distance to the 'near' point in km, rounded to 2 decimals — null unless 'near' is used. | 7.42 |
latitude float Latitude in decimal degrees (-90..90), rounded to 6 decimals (~0.11 m).
example: 40.782912
longitude float Longitude in decimal degrees (-180..180), rounded to 6 decimals.
example: -73.965355
distanceKm float nullable Great-circle (haversine, R = 6371 km) distance to the 'near' point in km, rounded to 2 decimals — null unless 'near' is used.
example: 7.42
/api/coordinates?seed=42 {
"data": [
{
"latitude": -2.546864,
"longitude": 63.812869,
"distanceKm": null
},
{
"latitude": -67.058909,
"longitude": -177.913729,
"distanceKm": null
},
{
"latitude": 45.558687,
"longitude": -137.158407,
"distanceKm": null
},
{
"latitude": -43.732874,
"longitude": 30.496248,
"distanceKm": null
},
{
"latitude": 41.866741,
"longitude": 77.437747,
"distanceKm": null
},
{
"latitude": -75.181374,
"longitude": -32.031534,
"distanceKm": null
},
{
"latitude": -56.48045,
"longitude": -40.249277,
"distanceKm": null
},
{
"latitude": 41.858417,
"longitude": 12.748485,
…
"generatedAt": "2026-07-30T15:14:08.000Z"
}
} /api/coordinates?near=40.7128,-74.006&radiusKm=25&count=5 {
"data": [
{
"latitude": 40.644073,
"longitude": -74.189791,
"distanceKm": 17.28
},
{
"latitude": 40.757481,
"longitude": -74.003851,
"distanceKm": 4.97
},
{
"latitude": 40.86526,
"longitude": -73.818859,
"distanceKm": 23.14
},
{
"latitude": 40.636674,
"longitude": -74.065071,
"distanceKm": 9.82
},
{
"latitude": 40.667849,
"longitude": -74.270169,
"distanceKm": 22.83
}
],
"meta": {
"endpoint": "coordinates",
"count": 5,
"seed": 42,
"params": {
"near": "40.7128,-74.006",
"radiusKm": 25
},
"generatedAt": "2026-07-30T15:14:08.000Z"
}
} /api/coordinates?bbox=24.5,-125,49.5,-66.9&count=5&seed=7 {
"data": [
{
"latitude": 40.470945,
"longitude": -75.403725,
"distanceKm": null
},
{
"latitude": 37.925666,
"longitude": -90.324692,
"distanceKm": null
},
{
"latitude": 34.855404,
"longitude": -80.55059,
"distanceKm": null
},
{
"latitude": 43.331618,
"longitude": -107.279475,
"distanceKm": null
},
{
"latitude": 46.287619,
"longitude": -108.368841,
"distanceKm": null
}
],
"meta": {
"endpoint": "coordinates",
"count": 5,
"seed": 7,
"params": {
"bbox": "24.5,-125,49.5,-66.9"
},
"generatedAt": "2026-07-30T15:14:08.000Z"
}
} Generates random latitude/longitude pairs with mathematically honest sampling — the kind map demos and geo tests actually need:
lat = asin(2u − 1), not uniform in latitude — naive generators cluster points toward the poles; this one doesn't.bbox=minLat,minLng,maxLat,maxLng: area-uniform inside the box (every record is guaranteed inside, bounds inclusive). Antimeridian-crossing boxes (minLng > maxLng) are rejected — split them at 180°.near=lat,lng (+ radiusKm, default 50): uniform over the spherical disk around the point — radius scaled by √u so points don't pile up at the center, and offsets computed with the exact spherical formula so the disk stays a disk even at 78°N or across the antimeridian. Each record's distanceKm is the haversine distance (R = 6371 km) to the near point, computed from the returned rounded coordinates, and is always ≤ radiusKm.near and bbox are mutually exclusive (400), radiusKm without near is a 400, and malformed or out-of-range values are rejected with the expected format spelled out. Coordinates have 6 decimals (~0.11 m); with a seed the same request returns identical points forever.
Yes — global points are area-uniform on the sphere, avoiding the pole-clustering bug of naive lat/lng generators.
Yes — near=lat,lng with radiusKm scatters points within that radius and reports each point's haversine distanceKm; or pass bbox for a rectangle.
No — they're mutually exclusive constraints, and the API answers 400 rather than silently picking one.
Great-circle distance, bearings, destinations and bounding boxes for WGS 84 coordinates on an explicitly documented mean-Earth sphere.
6,300+ world cities from a pinned GeoNames snapshot: coordinates, IANA timezone, population and capital flag — filter by country, size, name or distance.
Locale-aware fake postal addresses — street, city, state, zip, country and coordinates that all agree, plus a one-line formatted form in the local layout.
Random integers or floats in any range — control decimal precision, draw guaranteed-unique values, and pin a seed for reproducible sequences.
Parse messy DMS, DDM, decimal or ISO 6709 coordinate text into WGS 84 decimal degrees, reformat a point in any notation, and convert Maidenhead locators.
Convert WGS 84 latitude and longitude to UTM, UPS and MGRS and back, with grid zone, band letter, convergence, scale factor and the Norway/Svalbard exceptions.