Getting Started


API Access Key & Authentication

After creating an account, you will be assigned an API access key, a unique 32-character hash that allows you to authenticate with the IPAPI interface. To do this, simply append your API access key to the API's base URL using the access_key parameter.

Sign Up to Run API Request

Keep your API access key safe: Your API access key is private and should at no time be shown publicly. You can reset it with immediate effect using your account dashboard at any given time.

API Response

Following a successful API request, the API will return more than 40 unique response objects containing result data. An API response can be returned in JSON or XML format and is structured into 4 modules: General information, location data, time zone data, currency data, connection data and security data. Response objects contained in each module will be explained in detail in the API Response Objects section.

Find below an example API response for an IPv4 address in Brooklyn, New York.

Example API Response:

Please note: To be able to show you a comprehensive API response, Hostname and Security data have been included in the result above. To enable this data in your API response, please follow the instructions in the Hostname Lookup and Security Data sections of this documentation.

API Endpoints

The API includes three endpoints, each covering a different type of functionality. Please find below a quick overview, and click any endpoint to learn more about its usage.

256-bit HTTPS Encryption

You can connect to the API using industry standard HTTPS (SSL) by appending an " s "  to the HTTP Protocol. You can see an example API request using HTTPS below.

Example API Request:

JSONP Callbacks

The API supports JSONP Callbacks. To make use of this feature, simply append the API's callback parameter to your API request URL and set it to your preferred function name. The API will then return your API results set wrapped inside the tags of the function you specified.

Example API Request:

Sign Up to Run API Request

Example API Response:

Please note: The API also supports Access-Control (CORS) headers.

API Error Codes

If your API request fails for any reason, the API will return a JSON error message detailing the error that occurred. As an example, find below the error the API returns when the monthly API request limit is reached.

Example Error:

Common API Errors:

CodeTypeInfo
404404_not_foundUser requested a resource which does not exist.
101missing_access_keyUser did not supply an access key.
101invalid_access_keyUser supplied an invalid access key.
102inactive_userUser account is inactive or blocked.
103invalid_api_functionUser requested a non-existent API function.
104usage_limit_reachedUser has reached his subscription's monthly request allowance.
105function_access_restrictedThe user's current subscription does not support this API function.
106invalid_ip_addressThe IP Address supplied is invalid
301invalid_fieldsUser specified one or more invalid fields inside the fields parameter.
302too_many_ipsUser specified too many IP addresses in a single Bulk Lookup request.
303batch_not_supported_on_planThe user's current subscription plan does not support Bulk Lookup.

 

Questions? Contact Sales .
Need help? Contact Support .
© 2026 APILayer. All rights reserved.