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.
Trusted by Developers Worldwide
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.
Each call hits a continuously updated dataset. There is nothing to import or schedule, and fraud checks never run against stale ranges.
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 lookup returns these field groups. For the complete field reference, see our IP geolocation API page.
{
"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.
One of these three URL shapes handles any lookup you need. The step-by-step ipstack API guide explains parameters and error handling.
Pass any address in the path and get its full profile back.
Skip the address entirely: /check resolves whoever made the call.
Comma-separate up to 50 addresses and get an array of results back in one round trip. Built for logs, backfills, and batch enrichment.
# 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;
Current uptime is published on the API status page.
Global IP Data in One GET Request
One request returns location, network, and threat data for any IPv4 or IPv6 address.
These are the checks security and operations teams run on every event.
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.
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.
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.
Use a tool to check one address by hand. When your code needs to run the checks, use the API.
| Lookup tool | Lookup API | |
|---|---|---|
| Who uses it | A person, one IP at a time | Your code, on every event |
| Interface | Form and a results page | URL in, JSON out |
| Repetition | Manual, occasional | Automated, continuous |
| Free option | The widget at the top of this page | Free plan with an API key |
Start automating on the free IP API plan.
The IPstack MCP server gives AI agents these lookups as structured tools, and each one returns what a direct call would.
npx @apilayer/mcp-server{
"mcpServers": {
"apilayer": {
"url": "https://mcp.apilayer.com/mcp",
"headers": {
"Authorization": "Bearer ${env:APILAYER_MCP_TOKEN}"
}
}
}
}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.
Sign up, add your key to the same endpoint the demo uses, and run your first check today.