# iplookupapi documentation > iplookupapi resolves IP addresses to geolocation, network, timezone and security data over a simple JSON REST API. Authenticate every request with your API key via the `apikey` query parameter or request header. Base URL: https://api.iplookupapi.com OpenAPI specification: https://iplookupapi.com/docs/openapi.yaml --- Source: https://iplookupapi.com/docs ## Official libraries Building with an AI assistant? The full API is available as a machine-readable [OpenAPI 3.1 specification](https://iplookupapi.com/docs/openapi.yaml), and the documentation is published as [llms.txt](https://iplookupapi.com/docs/llms.txt) / [llms-full.txt](https://iplookupapi.com/docs/llms-full.txt). There is also a hosted [MCP server](https://iplookupapi.com/docs/mcp) at `https://api.iplookupapi.com/mcp` that AI agents can connect to directly. | Language | Code | Repository | |-----------------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------| | R | [https://github.com/everapihq/iplookupapi-r](https://github.com/everapihq/iplookupapi-r) | [https://cran.r-project.org/web/packages/iplookupapi/index.html](https://cran.r-project.org/web/packages/iplookupapi/index.html) | | JavaScript ES6 module | [https://github.com/everapihq/iplookupapi-js](https://github.com/everapihq/iplookupapi-js) | [https://www.npmjs.com/package/@everapi/iplookupapi-js](https://www.npmjs.com/package/@everapi/iplookupapi-js) | | PHP | [https://github.com/everapihq/iplookupapi-php](https://github.com/everapihq/iplookupapi-php) | [https://packagist.org/packages/everapi/iplookupapi-php](https://packagist.org/packages/everapi/iplookupapi-php) | | Go | [https://github.com/everapihq/iplookupapi-go](https://github.com/everapihq/iplookupapi-go) | [https://pkg.go.dev/github.com/everapihq/iplookupapi-go](https://pkg.go.dev/github.com/everapihq/iplookupapi-go) | | Rust | [https://github.com/everapihq/iplookupapi-rs](https://github.com/everapihq/iplookupapi-rs) | [https://crates.io/crates/iplookupapi-rs](https://crates.io/crates/iplookupapi-rs) | | Ruby | [https://github.com/everapihq/iplookupapi-ruby](https://github.com/everapihq/iplookupapi-ruby) | [https://rubygems.org/gems/iplookupapi](https://rubygems.org/gems/iplookupapi) | | C# | [https://github.com/everapihq/iplookupapi-dotnet](https://github.com/everapihq/iplookupapi-dotnet) | [https://www.nuget.org/packages/iplookupapi/](https://www.nuget.org/packages/iplookupapi/) | | Python | [https://github.com/everapihq/iplookupapi-python](https://github.com/everapihq/iplookupapi-python) | [https://pypi.org/project/iplookupapi/0.1/](https://pypi.org/project/iplookupapi/0.1/) | ## Authentication & API key Information iplookupapi.com uses API keys to allow access to the API. You can register a new API key at our developer portal. While our free plan only allows one API key at a time, our paid plans offer multiple API keys. By using separate keys for different use cases you can track individual usage and make key rotations affect only certain parts of your application. ## Authentication methods To authorize, you can use the following ways: ### GET query parameter You can pass your API key along with every request by adding it as a query parameter `apikey` This method could expose your API key in access logs and such. Sending the API key via a header parameter as specified below circumvents this problem. ```bash curl "https://api.iplookupapi.com/v1/info?ip=1.1.1.1&apikey=YOUR-APIKEY" ``` ```javascript var oReq = new XMLHttpRequest(); oReq.addEventListener("load", function () { console.log(this.responseText); }); oReq.open("GET", "https://api.iplookupapi.com/v1/info?ip=1.1.1.1&apikey=YOUR-APIKEY"); oReq.send(); ``` ```php $url = "https://api.iplookupapi.com/v1/info?ip=1.1.1.1&apikey=YOUR-APIKEY"; $curl = curl_init($url); $resp = curl_exec($curl); var_dump($resp); ```` ```python import requests from requests.structures import CaseInsensitiveDict url = "https://api.iplookupapi.com/v1/info?ip=1.1.1.1&apikey=YOUR-APIKEY" resp = requests.get(url) print(resp.status_code) ```` ### HTTP Header You can set a request header with the name `apikey` ```bash curl "https://api.iplookupapi.com/v1/info?ip=1.1.1.1" \ -H "apikey: YOUR-APIKEY" ``` ```javascript var oReq = new XMLHttpRequest(); oReq.addEventListener("load", function () { console.log(this.responseText); }); oReq.open("GET", "https://api.iplookupapi.com/v1/info?ip=1.1.1.1"); oReq.setRequestHeader("apikey", "YOUR-APIKEY"); oReq.send(); ``` ```php $url = "https://api.iplookupapi.com/v1/info?ip=1.1.1.1"; $curl = curl_init($url); $headers = array( "apikey: YOUR-APIKEY", ); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); $resp = curl_exec($curl); var_dump($resp); ```` ```python import requests from requests.structures import CaseInsensitiveDict url = "https://api.iplookupapi.com/v1/info?ip=1.1.1.1" headers = CaseInsensitiveDict() headers["apikey"] = "YOUR-APIKEY" resp = requests.get(url, headers=headers) print(resp.status_code) ```` ## Rate limit and quotas You can use a certain number of requests per month, defined by your plan. Once you go over this quota, the API returns a `429` HTTP status code, and you either need to upgrade your plan or wait until the end of the month. We enforce a minute rate limit for specific plans. If you exceed this, the API returns a `429` HTTP status code. You then have to wait until the end of the minute to make more requests. Not every request counts Only successful calls count against your quota. Any error on our side or validation errors (e.g., wrong parameter) will NOT count against your quota or rate limit. ### Response Headers We attach specific headers to tell you your current monthly/minute quota and how much you have remaining in the period. ```HTTP X-RateLimit-Limit-Quota-Minute: 10 X-RateLimit-Limit-Quota-Month: 300 X-RateLimit-Remaining-Quota-Minute: 5 X-RateLimit-Remaining-Quota-Month: 199 ``` --- Source: https://iplookupapi.com/docs/info # Info Endpoint Checks the provided ip address (both `v4` & `v6` formats) and returns all available information. **Request Method:** `GET` **Request URL:** `https://api.iplookupapi.com/v1/info/?ip=[[ ip ]]` ## Request Parameters | Parameter | Type | Mandatory | Description | | ---------- | -------------------------- | ---------- | ------------------------------------------------------- | | `apikey` | _string_ | ️ | Your API Key | | `ip` | _string_, _Path Parameter_ | ️ | The ip address you want to query | | `language` | _string_ | | An ISO Alpha 2 Language Code for localising the ip data | ## Sample Response ```json { "data": { "timezone": { "id": "Australia/Sydney", "current_time": "2022-04-25T18:56:38+10:00", "code": "AEST", "is_daylight_saving": false, "gmt_offset": 36000 }, "ip": "1.1.1.1", "type": "v4", "connection": { "asn": 13335, "organization": "CLOUDFLARENET", "isp": "Cloudflare" }, "location": { "geonames_id": 2147714, "latitude": -33.86714172363281, "longitude": 151.2071075439453, "zip": "2000", "continent": { "code": "OC", "name": "Oceania", "name_translated": "Oceania" }, "country": { "alpha2": "AU", "alpha3": "AUS", "calling_codes": ["+61"], "currencies": [ { "symbol": "AU$", "name": "Australian Dollar", "symbol_native": "$", "decimal_digits": 2, "rounding": 0, "code": "AUD", "name_plural": "Australian dollars" } ], "emoji": "🇦🇺", "ioc": "AUS", "languages": [ { "name": "English", "name_native": "English" } ], "name": "Australia", "name_translated": "Australia", "timezones": [ "Australia/Lord_Howe", "Antarctica/Macquarie", "Australia/Hobart", "Australia/Currie", "Australia/Melbourne", "Australia/Sydney", "Australia/Broken_Hill", "Australia/Brisbane", "Australia/Lindeman", "Australia/Adelaide", "Australia/Darwin", "Australia/Perth", "Australia/Eucla" ], "is_in_european_union": false }, "city": { "name": "Sydney", "name_translated": "Sydney" }, "region": { "fips": "AS-02", "alpha2": "AU-NSW", "name": "New South Wales", "name_translated": "New South Wales" } } } } ``` --- Source: https://iplookupapi.com/docs/mcp # MCP Server iplookupapi ships a hosted [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server, so AI agents and assistants can call the API as native tools — no SDK or glue code required. ``` https://api.iplookupapi.com/mcp ``` The endpoint speaks the streamable HTTP transport. Listing the available tools works without authentication; executing a tool requires your API key, sent as the `apikey` header. You can [get a free API key here](https://app.iplookupapi.com/register). ## Connect Using Claude Code: ```bash claude mcp add --transport http iplookupapi https://api.iplookupapi.com/mcp --header "apikey: YOUR_API_KEY" ``` Or add the server to any MCP-capable client (Claude Desktop, Cursor, VS Code, ...): ```json { "mcpServers": { "iplookupapi": { "url": "https://api.iplookupapi.com/mcp", "headers": { "apikey": "YOUR_API_KEY" } } } } ``` ## Available tools The tools are generated from the same [OpenAPI specification](https://iplookupapi.com/docs/openapi.yaml) that describes the REST API, so they always match the documented endpoints, parameters and responses. | Tool | Endpoint | Description | |---|---|---| | `getInfo` | `GET /v1/info` | Look up an IP address | | `getStatus` | `GET /v1/status` | Account quota status | ## Quotas and errors Tool calls are metered exactly like REST requests: they consume your plan quota and return the same status codes and error responses (`401`, `422`, `429`, ...). If a call fails, the tool result contains the API's error message including hints on how to proceed. --- Source: https://iplookupapi.com/docs/status # Status Endpoint Returns your current quota Requests to this endpoint do not count against your quota or rate limit **Request Method:** `GET` **Request URL:** `https://api.iplookupapi.com/v1/status` ## Request Parameters | Parameter | Type | Mandatory | Description | | --------- | -------- | ---------- | ------------ | | `apikey` | _string_ | ️ | Your API Key | ## Sample Response ```json { "quotas": { "month": { "total": 300, "used": 71, "remaining": 229 } } } ``` --- Source: https://iplookupapi.com/docs/status-codes # Request Status Codes For all requests, we will return an HTTP status code that indicates a success or the problem that has led to the failure. A successful request will be returned with status code `200` ## API Error Codes ### 401 Invalid authentication credentials ### 403 You are not allowed to use this endpoint, please [upgrade your plan](https://app.cu# Request Status Codes For all requests, we will return an HTTP status code that indicates a success or the problem that has led to the failure. A successful request will be returned with status code `200` ## API Error Codes ### 401 Invalid authentication credentials ### 403 You are not allowed to use this endpoint, please [upgrade your plan](https://app.iplookupapi.com/subscription). ### 404 A requested endpoint does not exist ### 422 Validation error, please check the list of validation errors: [here](#validation-errors) ### 429 You have hit your rate limit or your monthly limit. For more requests please [upgrade your plan](https://app.iplookupapi.com/subscription). ### 500 Internal Server Error - let us know: support@iplookupapi.com ## Validation errors #### Invalid Ip The `ip` must be a valid IP address #### Missing ip The `ip` parameter is required #### Invalid language The selected `language` is invalid Should be an ISO Alpha 2 Language Code for localising the ip data --- Source: https://iplookupapi.com/docs/testing # Testing ***Available in plans >= medium*** This page includes all needed information to make sure your test environment works before deploying to production. ### Sandbox API Keys An API request sent with a sandbox api key is automatically identified as a request in sandbox mode. All request with sandbox keys will respond with dummy data. Requests done with sandbox keys do not count against your quota ### Response All API endpoints will respond with the data for the IP `1.1.1.1` and the ASN `AS13335`