← Back to API Ninjas
Get location information for an IP address
Returns location information for an IP address. Requires an `address` in IPv4 form such as 73.9.149.180 or in IPv6 form.
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/iplookup",
query: {
"address": "example"
}
});
console.log(output);Query parameters
addressrequired
string
IP Address to query. Must be in IPv4 format A.B.C.D (e.g., 73.9.149.180) or IPv6 format X:X:X:X:X:X:X:X (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).