← Back to API Ninjas
Convert latitude/longitude coordinates to city locations.
Converts a `lat` and `lon` pair into the matching place name and administrative area. For the opposite direction use /geocoding.
API Ninjas·$0.001 per call
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "api-ninjas",
path: "/v1/reversegeocoding",
query: {
"lat": 123,
"lon": 123
}
});
console.log(output);Query parameters
latrequired
number
Latitude coordinate.
lonrequired
number
Longitude coordinate.