# IPRout API Documentation

## Page URL

https://iprout.com/docs

## Summary

IPRout API documentation for GeoIP and ASN lookup endpoints, authentication,
errors and response examples.

Use IPRout to retrieve geolocation, timezone, currency, calling code, ASN and
network ownership data for the caller IP or for a specific IP address supplied
in the path.

## Base URL

```text
https://api.iprout.com
```

## Lookup Caller IP

Call this endpoint with no path parameter to look up the IP address making the
request. IPRout resolves the caller from trusted proxy headers such as
X-Forwarded-For.

Endpoint:

```text
GET /ip
```

## Lookup IP Address

Add an IPv4 or IPv6 address to the path to look up that specific address. This
does not use the caller IP.

Endpoint:

```text
GET /ip/{ip}
```

Example:

```text
GET /ip/8.8.8.8
```

Response:

```json
{
  "ip": "8.8.8.8",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "city": "Mountain View",
  "timezone": "America/Los_Angeles",
  "utc_offset": "-07:00",
  "latitude": 37.4056,
  "longitude": -122.0775,
  "asn": 15169,
  "organization": "Google LLC",
  "currency": "USD",
  "calling_code": "+1"
}
```

## Authentication

IPRout uses API key authentication.

Bearer API key header:

```text
Authorization: Bearer YOUR_API_KEY
```

Alternative header:

```text
X-API-Key: YOUR_API_KEY
```

## Errors

| Status | Meaning |
| --- | --- |
| 401 | Missing or invalid API key |
| 422 | Invalid IP |
| 429 | Rate Limited |
| 500 | Internal Server Error |

## Developer Resources

### Postman Collection

https://documenter.getpostman.com/view/55991899/2sBXwtrASm

### OpenAPI Specification

https://iprout.com/docs/openapi.json

### GitHub Examples

https://github.com/IProut2026/examples

### AI MCP Server

https://iprout.com/mcp-server

### AI MCP Server Markdown

https://iprout.com/mcp-server.md

## Related Pages

- Developer Key: https://iprout.com/developer-key
- Pricing: https://iprout.com/pricing
- FAQ: https://iprout.com/faq
