mlab IP Lookup API

Threat intelligence and geolocation for IP addresses.

GitHub OpenAPI

Operations 1

GET /api/v1/scan/ip Look up an IP address or CIDR range #

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/mlab-sh:mlab-sh-ip-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mlab-sh-ip-lookup-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mlab.sh IP Lookup API
  version: 1.0.0
  description: 'The **mlab.sh** REST API lets you launch domain security scans, look up IP, crypto, hash, URL, email, phone and MAC intelligence, extract IOCs from raw text, analyze files and scripts, triage indicator lists, run RedKit audits, schedule scans, work on cases and inspect SSL certificates programmatically.


    All endpoints are authenticated with an API key sent in the `Authorization` header. Generate a key from **Organization → Settings → API keys** on mlab.sh. A key belongs to the organization and carries permissions chosen when it is created (`scan.lookup`, `scan.domain`, `scan.file`, `scan.batch`, `redkit`, `watchdog.read`, `watchdog.write`, `cases.read`, `cases.write`, `tags.read`, `tags.write`, `webhooks.manage`, or full access). A call outside the key''s permissions returns **403** naming the missing permission; organization and account settings are never reachable with a key. `webhooks.manage` is the one exception and is **never part of full access**: it must be ticked by name (a full-access key can hold it too). It lets a key register signed webhook endpoints and list or delete only the ones it registered itself.


    **Working through an AI agent?** Prefer the Model Context Protocol server at `https://mlab.sh/mcp` (Streamable HTTP, OAuth 2.0 or an `mcp_` token). It exposes 48 tools covering most of what is below plus CVE search, threat-actor attribution, SBOM scanning, cases and workspace memory, cluster and Proxmox inspection and offline indicator lookups that consume no scan quota, so it is a wider surface than this REST API rather than a wrapper over it. See https://doc.mlab.sh/docs/mlab.sh/integrations/mcp and https://mlab.sh/llms.txt.


    **Permissions.** Each operation lists the API key permission it needs (`x-api-key-permission`). Keys created before 2026-10-01 were migrated to full access.


    **Expiry.** A key is created with a lifetime (90 days by default; 30, 180, 365 days or never). An expired key is answered **401**, like an unknown one. The expiry date shows in Organization → Settings → API keys.


    **Quota headers.** Every call that spends scan quota answers with `X-RateLimit-Limit` (the plan''s limit for that scan type), `X-RateLimit-Remaining` (what is left after this call), `X-RateLimit-Resource` (the scan type) and `X-RateLimit-Window` (86400: quotas count a rolling 24 hours, so there is no fixed reset time). Unlimited plans send none.'
  contact:
    name: mlab.sh support
    email: contact@cyberdream.io
    url: https://mlab.sh
  license:
    name: Proprietary
  x-source-of-truth: html/openapi.json in the mlab.sh app repository, served at https://mlab.sh/openapi.json. The docs repository generates openapi.yaml from it with scripts/sync-openapi.mjs.
servers:
- url: https://mlab.sh
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: IP Lookup
  description: Threat intelligence and geolocation for IP addresses.
paths:
  /api/v1/scan/ip:
    get:
      tags:
      - IP Lookup
      summary: Look up an IP address or CIDR range
      operationId: lookupIp
      description: 'For a single address: geolocation, ISP/ASN, network type (proxy, hosting, mobile), reverse DNS with forward confirmation, the RDAP allocation record for its block including the network abuse contact and Tor exit-node status. Address lookups are cached for 7 days and consume IP scan quota.


        For a CIDR range such as `10.0.0.0/8`: network and broadcast address, the usable host window, netmask and wildcard, range size, and the reserved block it falls in, if any. Range analysis is arithmetic on the address bits, so it makes no upstream call and consumes no quota.


        **API key permission:** `scan.lookup`.'
      parameters:
      - name: ip
        in: query
        required: true
        description: IPv4 or IPv6 address, or a CIDR range, to look up.
        schema:
          type: string
          example: 8.8.8.8
      responses:
        '200':
          description: IP intelligence. The shape differs for a reserved address and for a CIDR range.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/IpInfo'
                - $ref: '#/components/schemas/ReservedIp'
                - $ref: '#/components/schemas/CidrRange'
              examples:
                public:
                  summary: Public IP (8.8.8.8)
                  value:
                    ip: 8.8.8.8
                    reserved: false
                    isp: Google LLC
                    org: Google Public DNS
                    as: AS15169 Google LLC
                    city: Ashburn
                    region: Virginia
                    country: United States
                    country_code: US
                    continent: North America
                    continent_code: NA
                    timezone: America/New_York
                    zip: '20149'
                    lat: 39.03
                    lon: -77.5
                    currency: USD
                    proxy: false
                    hosting: true
                    mobile: false
                    rdns:
                      ip: 8.8.8.8
                      found: true
                      names:
                      - dns.google
                      name: dns.google
                      forward_confirmed: true
                      forward_addresses:
                      - 8.8.8.8
                    rdap:
                      ip: 8.8.8.8
                      found: true
                      name: GOGL
                      cidr: 8.8.8.0/24
                      country: US
                      holder: Google LLC
                      abuse_email: network-abuse@google.com
                    tor:
                      available: true
                      ip: 8.8.8.8
                      is_tor: false
                    status: success
                reserved:
                  summary: Reserved/private IP (192.168.1.1)
                  value:
                    ip: 192.168.1.1
                    reserved: true
                    type: ipv4
                    range: Private-use (192.168.0.0/16)
                    rfc: RFC 1918
                cidr:
                  summary: CIDR range (10.0.0.0/8)
                  value:
                    cidr: 10.0.0.0/8
                    input: 10.0.0.0/8
                    input_is_network: true
                    version: ipv4
                    prefix_length: 8
                    host_bits: 24
                    network: 10.0.0.0
                    broadcast: 10.255.255.255
                    first_usable: 10.0.0.1
                    last_usable: 10.255.255.254
                    netmask: 255.0.0.0
                    wildcard: 0.255.255.255
                    total_addresses: '16777216'
                    usable_hosts: '16777214'
                    reserved:
                      range: Private-use (10.0.0.0/8)
                      rfc: RFC 1918
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      x-api-key-permission: scan.lookup
components:
  responses:
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: Invalid or missing API key.
    Forbidden:
      description: The API key lacks the permission this endpoint needs, or the endpoint is not open to API keys (organization and account settings never are).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: This API key does not have the 'cases.write' permission (Write cases). An owner or admin can add it in the organization settings.
  schemas:
    ReservedIp:
      type: object
      description: Response shape for private/reserved IP ranges.
      properties:
        ip:
          type: string
        reserved:
          type: boolean
          example: true
        type:
          type: string
          example: ipv4
        range:
          type: string
          example: Private-use (192.168.0.0/16)
        rfc:
          type: string
          example: RFC 1918
    Rdns:
      type: object
      description: Reverse DNS for the address, with forward confirmation. A PTR record is a claim by whoever runs the address block; `forward_confirmed` says whether the name resolves back.
      properties:
        ip:
          type: string
        found:
          type: boolean
          description: A PTR record exists.
        names:
          type: array
          items:
            type: string
        name:
          type: string
          nullable: true
          description: The first PTR name.
        forward_confirmed:
          type: boolean
          nullable: true
          description: True when the name resolves back to this address. Null means the check could not be made, which is not the same as a failed check.
        forward_addresses:
          type: array
          items:
            type: string
          description: What the forward lookup returned, so a mismatch can be inspected.
    IpInfo:
      type: object
      properties:
        ip:
          type: string
        reserved:
          type: boolean
          example: false
        isp:
          type: string
        org:
          type: string
        as:
          type: string
          description: Autonomous System number and name.
        city:
          type: string
        region:
          type: string
        country:
          type: string
        country_code:
          type: string
        continent:
          type: string
        continent_code:
          type: string
        timezone:
          type: string
        zip:
          type: string
        lat:
          type: number
        lon:
          type: number
        currency:
          type: string
        status:
          type: string
          example: success
        proxy:
          type: boolean
          description: Address belongs to a known proxy, VPN or anonymizing service.
        hosting:
          type: boolean
          description: Address belongs to a datacenter or hosting provider rather than an access network.
        mobile:
          type: boolean
          description: Address belongs to a mobile carrier network.
        rdns:
          $ref: '#/components/schemas/Rdns'
        rdap:
          $ref: '#/components/schemas/RdapIp'
        tor:
          type: object
          description: Tor exit-node status.
          properties:
            available:
              type: boolean
            ip:
              type: string
            is_tor:
              type: boolean
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Description of what went wrong.
    CidrRange:
      type: object
      description: 'A network range, computed from the address bits. Offline: no upstream lookup, no quota.'
      properties:
        cidr:
          type: string
          description: The range in canonical network/prefix form.
          example: 10.0.0.0/8
        input:
          type: string
          description: The value as supplied.
        input_is_network:
          type: boolean
          description: False when the input named a host inside the range rather than the network itself.
        version:
          type: string
          enum:
          - ipv4
          - ipv6
        prefix_length:
          type: integer
          example: 8
        host_bits:
          type: integer
          example: 24
        network:
          type: string
          example: 10.0.0.0
        broadcast:
          type: string
          nullable: true
          description: IPv4 only, and absent for a /31 and /32. IPv6 has no broadcast address.
        first_usable:
          type: string
          example: 10.0.0.1
        last_usable:
          type: string
          example: 10.255.255.254
        netmask:
          type: string
          nullable: true
          description: IPv4 only.
          example: 255.0.0.0
        wildcard:
          type: string
          nullable: true
          description: IPv4 only.
          example: 0.255.255.255
        total_addresses:
          type: string
          description: 'Decimal string: an IPv6 range can hold more addresses than a 64-bit integer can count.'
          example: '16777216'
        usable_hosts:
          type: string
          example: '16777214'
        reserved:
          type: object
          nullable: true
          description: Set when the range sits inside a reserved block. Null for a routable range.
          properties:
            range:
              type: string
            rfc:
              type: string
    RdapIp:
      type: object
      description: The RIR allocation record for the block the address sits in.
      properties:
        ip:
          type: string
        found:
          type: boolean
        handle:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
          description: Network name as registered, e.g. GOGL.
        allocation_type:
          type: string
          nullable: true
          example: DIRECT ALLOCATION
        country:
          type: string
          nullable: true
        start_address:
          type: string
          nullable: true
        end_address:
          type: string
          nullable: true
        cidr:
          type: string
          nullable: true
          description: The block in CIDR form, when the registry publishes it.
        registered:
          type: string
          nullable: true
        updated:
          type: string
          nullable: true
        holder:
          type: string
          nullable: true
          description: Organisation the block is allocated to.
        abuse_name:
          type: string
          nullable: true
        abuse_email:
          type: string
          nullable: true
          description: Where to report abuse originating from this address.
        abuse_phone:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Your API key, prefixed with `token `. Example: `Authorization: token mlab_your_api_key_here`. Each key only reaches the endpoints its permissions allow.

        '