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

3,600+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
217ms260ms274ms609ms1030ms

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.

Response

  • url

    The URL that was looked up.

  • country

    Country name.

  • country_code

    2-letter ISO 3166 alpha-2 country code.

  • region

    State, province, or administrative region name.

  • region_code

    Region code (e.g., state code).

  • city

    City name.

  • zip

    ZIP or postal code.

  • lat

    Latitude coordinate.

  • lon

    Longitude coordinate.

  • timezone

    Timezone (e.g., America/New_York).

  • isp

    Internet Service Provider name.

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

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.