IP-API.io Asn API

The Asn API from IP-API.io, for asn.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

GET /api/v1/asn/as/{asn} ASN Lookup — by IP, AS Number, or Organization #
GET /api/v1/asn/{ip} ASN Lookup — by IP, AS Number, or Organization #

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/ip-api-io:ip-api-io-asn-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

ip-api-io-asn-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IP-API.io Asn API
  version: '2026-11-29'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-11-29: 7 operation(s) read from 8 public documentation page(s) (each operation names its page in x-source). This is not the provider''s published contract; IP-API.io has published no machine-readable contract that the pipeline could find. Engine: local.'
  x-evidence-tiers:
    code-example: 9
    documentation: -2
    pages-with-code: 7
    pages-read: 8
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-11-29'
  x-generator: generate-contract-from-docs.py
  x-engine: local
  x-sources:
  - https://ip-api.io/bot-detection-api
  - https://ip-api.io/ip-geolocation-api
  - https://ip-api.io/fraud-detection-api
  - https://ip-api.io/proxy-detection-api
  - https://ip-api.io/email-verification-api
  - https://ip-api.io/vpn-detection-api
  - https://ip-api.io/openapi.json
  - https://ip-api.io/asn-lookup
servers:
- url: https://ip-api.io
tags:
- name: Asn
paths:
  /api/v1/asn/as/{asn}:
    get:
      operationId: get_api_v1_asn_as_asn
      tags:
      - Asn
      summary: ASN Lookup — by IP, AS Number, or Organization
      description: Looks up an ASN by its number and returns the same fields as the IP lookup.
      x-source: https://ip-api.io/asn-lookup
      parameters:
      - name: asn
        in: path
        required: true
        schema:
          type: string
      - name: api_key
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AsnAsAsnResponse'
      x-evidence:
        kind: documentation
  /api/v1/asn/{ip}:
    get:
      operationId: get_api_v1_asn_ip
      tags:
      - Asn
      summary: ASN Lookup — by IP, AS Number, or Organization
      description: Returns ASN, organization, network prefix, datacenter flag, country and country code for the given IP.
      x-source: https://ip-api.io/asn-lookup
      parameters:
      - name: ip
        in: path
        required: true
        schema:
          type: string
      - name: api_key
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AsnIpResponse'
      x-evidence:
        kind: documentation
components:
  schemas:
    GetApiV1AsnAsAsnResponse:
      type: object
      properties:
        ip:
          type: string
        asn:
          type: integer
        organization:
          type: string
        network:
          type: string
        is_datacenter:
          type: boolean
        country:
          type: string
        country_code:
          type: string
    GetApiV1AsnIpResponse:
      type: object
      properties:
        ip:
          type: string
        asn:
          type: integer
        organization:
          type: string
        network:
          type: string
        is_datacenter:
          type: boolean
        country:
          type: string
        country_code:
          type: string