Overview

GeoDataSource lets you look up city names from latitude and longitude coordinates, making it simple to reverse-geocode a GPS position into a readable location. It also supports distance calculations between coordinates and city-to-coordinate lookups. A free tier is available with a limited number of daily API calls.

Beginner Tip

Use the free-tier endpoint to reverse-geocode coordinates into city names — it is the simplest starting point and requires only a latitude, longitude, and your API key.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

repository name and description
star and fork counts
contributor data
issues and pull requests
commit history
IP address details

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "status": "success",
  "data": {
    "result": "Data from GeoDataSource",
    "description": "Geocoding of city name by using latitude and longitude coordinates",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

city Name of the nearest city to the provided coordinates.
state State or province name for the location.
country Full country name for the location.
countryCode ISO 3166-1 alpha-2 two-letter country code.
latitude Latitude of the identified city center.
longitude Longitude of the identified city center.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.geodatasource.com/city?key=YOUR_API_KEY&lat=40.7128&lng=-74.0060";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

{"status":"INVALID_API_KEY"} The API key provided is missing or incorrect.
Sign up at geodatasource.com and replace YOUR_API_KEY with your actual key.
{"status":"OVER_QUERY_LIMIT"} You have exceeded the daily request limit on the free plan.
Wait until the next day for the limit to reset, or upgrade to a paid plan for higher quotas.
Empty city field in response The coordinates provided are in an ocean, uninhabited area, or are malformed.
Verify the lat/lng values are valid decimal degrees (e.g. lat between -90 and 90, lng between -180 and 180).

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →