Real-Time IP Lookup API: Check Any IP Address in Milliseconds

Check any IPv4 or IPv6 address and get location, ISP, timezone, and threat signals back as JSON. Try the demo below, then call the same endpoint from your own code.

GET api.ipstack.com/checkLIVE
ip
type
country
region
city / zip
lat / long
time_zone.id
connection
Try: ···
  • IPv4 & IPv6
  • 99.9% uptime
  • JSON in milliseconds

Trusted by Developers Worldwide

MicrosoftAirbnbSamsungActivisionHubSpot

What Is an IP Lookup API?

An IP lookup API accepts an IP address and instantly returns its location, network owner, and risk context as structured data. The lookup is an on-demand query against live data, not a search through files you maintain yourself.

Lookup API

Query at request time

Each call hits a continuously updated dataset. There is nothing to import or schedule, and fraud checks never run against stale ranges.

Database download

Import and maintain files

Local databases avoid a network hop but start going stale as soon as you import them. Every update means re-downloading and re-importing on your schedule.

Every Field You Get Back From One Lookup

Every lookup returns these field groups. For the complete field reference, see our IP geolocation API page.

Location

country_codecountry_nameregion_namecityziplatitudelongitudecountry_flag_emojiis_eu

Network & locale

connection.ispconnection.asntime_zone.idtime_zone.current_timecurrency.codecurrency.symbol

Risk

security.is_proxysecurity.proxy_typesecurity.is_torsecurity.is_crawlersecurity.threat_levelsecurity.threat_types
GET https://api.ipstack.com/81.2.69.160?access_key=YOUR_KEYSAMPLE
{
  "ip": "81.2.69.160",
  "type": "ipv4",
  "country_code": "GB",
  "country_name": "United Kingdom",
  "region_name": "England",
  "city": "London",
  "latitude": 51.5201,
  "longitude": -0.1094,
  "time_zone": { "id": "Europe/London" },
  "connection": { "asn": 20712, "isp": "Andrews & Arnold Ltd" },
  "security": { "is_proxy": false, "is_tor": false, "threat_level": "low" }
  // excerpt: a full response carries 100+ fields
}

The JSON IP API page details the full response format.

Check IPs Three Ways: Single, Your Visitor, or Bulk

One of these three URL shapes handles any lookup you need. The step-by-step ipstack API guide explains parameters and error handling.

Single IP lookup

Pass any address in the path and get its full profile back.

GET /134.201.250.155

Requester lookup: check your visitor’s IP automatically

Skip the address entirely: /check resolves whoever made the call.

GET /check

Bulk IP lookup: up to 50 IPs per request

Comma-separate up to 50 addresses and get an array of results back in one round trip. Built for logs, backfills, and batch enrichment.

GET /160.39.144.19,134.201.250.155
PROFESSIONAL+
# Check one IP
curl "https://api.ipstack.com/134.201.250.155?access_key=YOUR_KEY"
// Check one IP
const res = await fetch(
  `https://api.ipstack.com/${ip}?access_key=${process.env.IPSTACK_KEY}`
);
const result = await res.json();
console.log(result.country_code, result.connection.isp);
# Check one IP
import os, requests

result = requests.get(
    f"https://api.ipstack.com/{ip}",
    params={"access_key": os.environ["IPSTACK_KEY"]}
).json()

print(result["country_code"], result["connection"]["isp"])
// Check one IP
$result = json_decode(file_get_contents(
  "https://api.ipstack.com/$ip?access_key=$key"
));

echo $result->country_code, " ", $result->connection->isp;

Built for Real Time: Speed, Freshness, and Uptime

Current uptime is published on the API status page.

Milliseconds
JSON returned inside the request path
Continuous
Range updates supplied continuously by partner ISPs
99.9%
Uptime
2M+
Locations covered

Global IP Data in One GET Request

One request returns location, network, and threat data for any IPv4 or IPv6 address.

What Teams Use IP Lookup For

These are the checks security and operations teams run on every event.

Fraud screening at signup & checkout

Check every new account and order inline: mismatch between country_code and the billing country, is_proxy true, or an elevated threat_level routes the event to review before money moves.

Login security & impossible travel

Store the country and city of each session. A login from a new region minutes after one from home fails the sanity check, and is_tor flags anonymized attempts worth a second factor.

Traffic analytics & bot filtering

Split human traffic from automation with is_crawler and crawler_name, then segment the rest by geography using region_name without touching a client-side tracker.

IP Lookup Tool vs. IP Lookup API: Which Do You Need?

Use a tool to check one address by hand. When your code needs to run the checks, use the API.

Lookup toolLookup API
Who uses itA person, one IP at a timeYour code, on every event
InterfaceForm and a results pageURL in, JSON out
RepetitionManual, occasionalAutomated, continuous
Free optionThe widget at the top of this pageFree plan with an API key

Start automating on the free IP API plan.

Run IP Lookups Over MCP

The IPstack MCP server gives AI agents these lookups as structured tools, and each one returns what a direct call would.

Runnpx @apilayer/mcp-server
  • Connects to Claude Desktop, Cursor, VS Code Copilot, Windsurf, and Cline
  • Handles all three lookup shapes: single IP, visitor checks, and bulk batches
  • Uses your existing access key through one environment variable
MCP client config · Claude Desktop, Cursor, and others
{
  "mcpServers": {
    "apilayer": {
      "url": "https://mcp.apilayer.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:APILAYER_MCP_TOKEN}"
      }
    }
  }
}

Frequently Asked Questions - IP Lookup API

A real-time IP lookup API answers each query against a continuously updated dataset at request time, so you never manage data files. A database download, the MaxMind model, means importing files locally and re-importing every update. Local files avoid the network hop, but the API stays current with no maintenance on your side.

Fast enough to sit in your request path: lookups return as JSON in milliseconds, behind a 99.9% uptime record. For a hard number in your own stack, measure from your region with a free key, since latency depends on where your servers sit.

Yes. The bulk endpoint accepts a comma-separated list of up to 50 IP addresses in one request and returns an array of full results. It is available on the Professional+ plan and built for enriching logs, backfills, and batch jobs where one request per IP would be too slow.

Yes. IPv4 and IPv6 addresses work on the same endpoints with the same fields and the same response shape. There is no separate IPv6 product or extra parameter, and dual-stack traffic needs no special handling anywhere in your integration code.

Call GET https://api.ipstack.com/check?access_key=YOUR_KEY from your server and the API resolves the address behind the request automatically and returns the full lookup result for whoever made the call. Keep the call server-side: running it in browser JavaScript would expose your access key in the page source.

A lookup tool suits manual checks: a person pastes one IP into a form and reads the result. A lookup API is built into your code, so your systems query addresses automatically and parse the JSON. ipstack’s demo widget is the tool, and a free API key puts the same lookups in your code.

Start Looking Up IPs in Minutes

Sign up, add your key to the same endpoint the demo uses, and run your first check today.