API Authentication

All IPGeolocation.io API endpoints except /v3/getip require authentication. Use an API key for all authenticated endpoints, including bulk requests. Request Origin authentication is available on supported single-lookup endpoints for eligible paid accounts; it does not replace the API key required for bulk requests. The Get IP endpoint does not require authentication.

Your plan determines what you can access (credits and features), but this page focuses on authentication methods and request credentials.


At a Glance

  • Recommended for backend/server-side requests: API key using apiKey query parameter.
  • For browser-based single lookups on paid plans: Request Origin (CORS). Bulk requests always need an API key.
  • Optional on all plans: IP whitelisting limits an API key to up to 10 IP addresses or CIDR ranges.
  • No-auth utility endpoint: /v3/getip.

Authentication Methods

IPGeolocation.io supports two authentication methods:


1. API Key (Recommended)

You can make authenticated API requests by passing your API key as a query parameter.

How to Use:

  1. Log in to your Billing dashboard.
  2. Copy your API key from the API Keys section.
  3. Pass apiKey as a query parameter in your requests.
  4. Do not place API keys in client-side JavaScript. For server-side usage, store your API key in environment variables.

Example request with apiKey:

curl -X GET 'https://api.ipgeolocation.io/v3/ipgeo?apiKey=API_KEY&ip=8.8.8.8'

I. Database Subscribers (Downloads)

If you are a database subscriber, you also need a valid IPGeolocation.io API key to download and use database archives.

See Databases Documentation for database plans and file details.


2. Request Origin (CORS) (Paid Plans Only)

Request Origin lets you call APIs from client-side JavaScript without exposing your API key in frontend code. This is available on all paid plans for single-lookup endpoints; bulk endpoints always require an API key.

How to Configure:

  1. Log in to your Billing dashboard.
  2. In the API Keys section, click Add more to add a new API key or request origin.
  3. A form opens with two options: API Key and Request Origin.
  4. Choose Request Origins and enter the domain where requests will be made.
  5. After saving, requests from the main domain and subdomains work without passing apiKey.

IP Whitelisting (All Plans)

IP whitelisting limits an API key to the IP addresses you list. Each key can have up to 10 entries, each an IPv4 address, an IPv6 address, or a CIDR range, and the API rejects any request made with that key from an address outside the list. A key with no entries works from any IP address. IP whitelisting is available on all plans, including the free plan.

Use it for keys that only your own servers call. If the key leaks, requests made with it from addresses outside the list fail.

How to Configure:

  1. Log in to your Billing dashboard.
  2. Open API from the sidebar.
  3. In the API Keys section, click the IP whitelisting button (shield icon) next to the key.
  4. In Add IPs or CIDRs, enter up to 10 IP addresses or CIDR ranges, separated by commas or new lines. For example, 192.0.2.10 for a single server, 192.0.2.0/24 for an IPv4 range, or 2001:db8::/64 for an IPv6 range.
  5. Click Add whitelist entries.
  6. Send a test request with the key from each listed server and check that it returns HTTP 200.

To remove an entry, open the same panel and click Remove next to it.

A request made with the key from an IP address that isn't on the list fails with HTTP 403 Forbidden and this response:

Response Preview
{
  "message": "Your IP address 'x.x.x.x' is not allowed to use this API key. Please contact technical support for assistance at support@ipgeolocation.io"
}

API Key and Request Origin Limits (By Plan)

The number of extra API keys and request origins is limited based on your plan.

PlanNo. of Extra API Keys + Request Origins
Starter 150K credits/month1
Plus 500K credits/month2
Pro 1M credits/month2
Business 2M credits/month3
Premium 5M credits/month3

Frequently Asked Questions

All IPGeolocation.io API endpoints except /v3/getip require authentication. An API key works on every authenticated endpoint, including bulk; Request Origin (CORS) works only for single lookups on paid plans.
Yes. Use Request Origin (CORS) on paid plans to make single lookups from client-side JavaScript without exposing your API key.
Pass apiKey as a query parameter in your API requests.
Yes. On all plans, open API in your dashboard, click IP whitelisting next to the key, and add up to 10 IPv4 addresses, IPv6 addresses, or CIDR ranges. Requests made with the key from any other IP address return HTTP 403.
Yes. Database subscribers need a valid IPGeolocation.io API key to download and use database files.

Subscribe to Our Newsletter

Get the latest in geolocation tech, straight to your inbox.