Holiday Sale! Get over 30% off when you subscribe to an annual plan!

URL Lookup API

The URL Lookup API provides location information for any valid URL or domain name.

(4.4)

From 7,993 users

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
186ms202ms248ms506ms866ms

Didn't find what you were looking for? Suggest an improvement


/v1/urllookup GET

https://api.api-ninjas.com/v1/urllookup

Returns the location of the IP address hosting the URL domain. The response contains both the geographical coordinates (latitude/longitude) as well as the city and country.

Parameters

  • url  required

    Valid URL to check. It supports schemes (e.g. http://example.com) as well as schemeless (e.g. example.com) formats.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

url

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/urllookup?url=example.com

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "is_valid": true, "country": "United States", "country_code": "US", "region_code": "MA", "region": "Massachusetts", "city": "Norwell", "zip": "02061", "lat": 42.1591, "lon": -70.8163, "timezone": "America/New_York", "isp": "MCI Communications Services, Inc. d/b/a Verizon Business", "url": "example.com" }

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/urllookup?url=https://example.com" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.