api-ninjas-com URL Lookup API

The URL Lookup API provides location information for any valid URL or domain name, including geographical coordinates, city, country, and details about the ISP.

GitHub OpenAPI

Operations 1

GET /v1/urllookup Lookup location information for a URL #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-ninjas-com:api-ninjas-com-url-lookup-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-ninjas-com-url-lookup-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas URL Lookup API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: URL Lookup
  description: The URL Lookup API provides location information for any valid URL or domain name, including geographical coordinates, city, country, and details about the ISP.
paths:
  /v1/urllookup:
    get:
      summary: Lookup location information for a URL
      description: Returns location information for a URL or domain name, including coordinates, city, country, and ISP details. Requires a `url`, with or without a scheme.
      operationId: getUrlInfo
      tags:
      - URL Lookup
      parameters:
      - name: url
        in: query
        required: true
        description: Valid URL to check. It supports schemes (e.g. http://example.com) as well as schemeless (e.g. example.com) formats.
        schema:
          type: string
      responses:
        '200':
          description: Successful response with location information of the URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlLookupResponse'
        '400':
          description: Bad Request - Invalid URL format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlLookupOpenapi_Error'
        '401':
          description: Unauthorized - API Key missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlLookupOpenapi_Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlLookupOpenapi_Error'
      security:
      - ApiKeyAuth: []
components:
  schemas:
    UrlLookupResponse:
      type: object
      properties:
        is_valid:
          type: boolean
          description: Indicates if the URL is valid.
        country:
          type: string
          description: The country where the URL's server is located.
        country_code:
          type: string
          description: The ISO country code for the country.
        region_code:
          type: string
          description: The region code within the country.
        region:
          type: string
          description: The region within the country.
        city:
          type: string
          description: The city where the URL's server is located.
        zip:
          type: string
          description: The postal code for the location.
        lat:
          type: number
          format: float
          description: Latitude of the location.
        lon:
          type: number
          format: float
          description: Longitude of the location.
        timezone:
          type: string
          description: The timezone of the location.
        isp:
          type: string
          description: The Internet Service Provider hosting the URL.
        url:
          type: string
          description: The URL that was looked up.
    UrlLookupOpenapi_Error:
      type: object
      properties:
        message:
          type: string
          description: Error message describing the issue.
        code:
          type: integer
          description: HTTP status code.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api