openapi: 3.0.0 info: description: 'Official OpenAPI Specification for IPinfo''s comprehensive IP intelligence API. This specification defines all endpoints for IP geolocation, ASN data, company information, privacy detection, and specialized data services. ## Authentication All endpoints support three authentication methods: - **HTTP Basic Auth**: Use your token as the username with empty password - **Bearer Token**: Include token in Authorization header - **Query Parameter**: Pass token as `?token=YOUR_TOKEN` [Learn more about authentication](https://ipinfo.io/developers#authentication) ## IPinfo API Tiers IPinfo offers three main API tiers with different feature sets: ### IPinfo Lite Lightweight IP geolocation with essential information including ASN details, country, and continent data. Perfect for basic geolocation needs with fast response times. Unlimited requests on paid plans. - Endpoints: `/lite/me`, `/lite/{ip}`, `/lite/{ip}/{field}` - Base URL: `https://api.ipinfo.io/` - [Documentation](https://ipinfo.io/developers/lite-api) ### IPinfo Core Comprehensive IP information with detailed geolocation data (city, region, coordinates, postal code, timezone), ASN information, and classification boolean flags (anycast, hosting, mobile, satellite). - Endpoints: `/lookup/me`, `/lookup/{ip}`, `/lookup/{ip}/{field}` - Base URL: `https://api.ipinfo.io/` - [Documentation](https://ipinfo.io/developers/core-api) ### IPinfo Plus All Core features plus mobile/carrier detection, anonymity analysis (VPN, proxy, Tor, relay detection), service identification, and extended geographic metadata. Ideal for security, fraud prevention, and advanced analytics. - Endpoints: `/plus/me`, `/plus/{ip}`, `/plus/{ip}/{field}` - Base URL: `https://api.ipinfo.io/` - [Documentation](https://ipinfo.io/developers/plus-api) ## Specialized Detection APIs ### Residential Proxy Detection Detect residential, mobile, and datacenter proxy IPs with activity insights, last seen dates, and proxy service identification. - Endpoints: `/{ip}/resproxy` - [Documentation](https://ipinfo.io/developers/residential-proxy-api) ### Privacy Detection Standard Detect VPNs, proxies, Tor exit nodes, relays, and hosting providers associated with an IP address. Returns core privacy signals including service provider identification. - Endpoints: `/{ip}/privacy` - [Documentation](https://ipinfo.io/developers/privacy-standard-api) ### Privacy Detection Extended Advanced anonymous IP detection with detailed methodologies, confidence metrics, and metadata for VPNs, proxies, Tor, hosting providers, and relays. - Endpoints: `/{ip}/privacy_extended` - [Documentation](https://ipinfo.io/developers/privacy-extended-api) ## Legacy API Products For backwards compatibility, legacy endpoints remain available: - [IP to Geolocation API](https://ipinfo.io/products/ip-geolocation-api) - Use Core or Plus instead - [IP to Privacy Detection API](https://ipinfo.io/products/proxy-vpn-detection-api) - Use Plus instead - [ASN API](https://ipinfo.io/products/asn-api) - `/AS{asn}` endpoint - [IP to Company API](https://ipinfo.io/products/ip-company-api) - `/{ip}/company` endpoint - [Hosted Domains API](https://ipinfo.io/products/reverse-ip-api) - `/domains/{ip}` endpoint - [IP to Phone Carrier Detection API](https://ipinfo.io/products/ip-carrier-api) - `/{ip}/carrier` endpoint - [IP to Abuse Contact API](https://ipinfo.io/products/ip-abuse-contact-api) - `/{ip}/abuse` endpoint - [IP WHOIS API](https://ipinfo.io/products/whois-api) - `/whois/*` endpoints ## Special Endpoints - **Token Info**: `/me` - View request limits and API access for your token - **Batch Requests**: `/batch` - Enrich multiple IPs in a single request - **IP Summarization**: `/tools/summarize-ips` - Analyze up to 500,000 IPs - **IP Mapping**: `/tools/map` - Visualize up to 500,000 IPs on an interactive map - **Single Field**: `/{ip}/{field}` - Get specific field values as plaintext ## Rate Limits - **IPinfo Lite**: Unlimited requests on paid plans - **Paid Plans**: Monthly request limits with configurable alerts and automatic metered billing - **Rate Limit Exceeded**: 429 HTTP status code when limit reached [View pricing and limits](https://ipinfo.io/pricing) ## Resources - **Developer Portal**: [https://ipinfo.io/developers](https://ipinfo.io/developers) - **API Libraries**: Official libraries for Python, Node.js, Java, Ruby, PHP, Go, and more - **Sign Up**: [Free account](https://ipinfo.io/signup) with up to 50,000 requests/month - **Community Support**: [https://community.ipinfo.io/](https://community.ipinfo.io/) - **Email Support**: support@ipinfo.io --- ' version: 1.0.0 title: IPinfo.io OpenAPI Specification abuse asn API contact: name: IPinfo email: support@ipinfo.io url: https://ipinfo.io/ servers: - url: https://ipinfo.io/ - url: https://v6.ipinfo.io/ - url: https://api.ipinfo.io/ tags: - name: asn description: ASN API. externalDocs: description: Find more info here url: https://ipinfo.io/data/ip-asn paths: /AS{asn}: get: tags: - asn summary: IPinfo Returns Information About an ASN description: 'Returns information about an ASN, such as the assigned prefixes, related domain, and more. The ASN API provides comprehensive information about an Autonomous System (AS) entity. It delivers data on the AS''s registration, ASN type, network details, associated prefixes (including IPv6), and relationships with other ASNs (peers, upstreams and downstreams). ' operationId: getAsn security: - BasicAuth: [] - BearerAuth: [] - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/Asn' responses: '200': $ref: '#/components/responses/Asn' '404': $ref: '#/components/responses/NotFoundASN' '403': $ref: '#/components/responses/Forbidden' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' components: responses: Forbidden: description: Unknown token or invalid permission. We return the same error for blocking malicious IP addresses as well. content: application/json: schema: $ref: '#/components/schemas/Error403' NotFoundASN: description: ASN not found. content: application/json: schema: $ref: '#/components/schemas/Error404ASN' InternalServerError: description: Internal server error or server unavailable. content: text/plain: schema: $ref: '#/components/schemas/Error500' Asn: description: ASN response object. content: application/json: schema: $ref: '#/components/schemas/AsnResponse' TooManyRequests: description: Allocated API rate limit has been reached for the token. The user will be prompted with options to increase their API limit. content: application/json: schema: $ref: '#/components/schemas/Error429' schemas: Error500: type: string example: Internal server error Error429: type: object required: - title - message properties: title: type: string example: Rate limit exceeded message: type: string example: Upgrade to increase your usage limits at https://ipinfo.io/pricing, or contact us via https://ipinfo.io/support Prefix: type: object required: - netblock - id - name - country properties: netblock: type: string example: 104.69.216.0/22 id: type: string example: AKAMAI name: type: string example: Akamai Technologies, Inc. country: type: string example: US size: type: string example: '256' status: type: string example: ALLOCATION domain: type: string nullable: true example: quadranet.com Prefix6: type: object required: - netblock - id - name - country properties: netblock: type: string example: 2601::/20 id: type: string example: COMCAST6NET name: type: string example: Comcast Cable Communications, LLC country: type: string example: US size: type: string example: '20282409603651670423947251286016' status: type: string example: ASSIGNMENT domain: type: string example: comcast.com AsnResponse: type: object required: - asn - name - domain - type properties: asn: type: string example: AS10507 name: type: string example: Sprint Personal Communications Systems country: type: string example: US allocated: type: string example: '1997-02-14' registry: type: string example: arin domain: type: string example: sprint.net num_ips: type: integer example: 71224576 route: type: string example: 66.87.125.0/24 type: type: string example: isp enum: - isp - business - education - hosting - inactive prefixes: type: array items: $ref: '#/components/schemas/Prefix' prefixes6: type: array items: $ref: '#/components/schemas/Prefix6' peers: type: array items: type: string example: '1299' upstreams: type: array items: type: string example: '1299' downstreams: type: array items: type: string example: '109' Error404ASN: type: object required: - error properties: error: type: string example: ASN Not Found! Error403: type: object required: - title - message properties: title: type: string example: Unknown token message: type: string example: Please ensure you've entered your token correctly. Refer to https://ipinfo.io/developers for details, or contact us at support@ipinfo.io for help parameters: Asn: name: asn in: path description: an ASN number. required: true schema: type: integer securitySchemes: BasicAuth: type: http scheme: basic BearerAuth: type: http scheme: bearer ApiKeyAuth: type: apiKey in: query name: token externalDocs: description: IPinfo Developers Portal / Documentation url: https://ipinfo.io/developers