Skip to content
OSINTtools.io

ipstack API

APILayer's geo-IP API: send an IP address, get location, ISP and ASN, time zone, currency and, on the top plan, proxy and Tor flags.

Base URL
https://api.ipstack.com
Sign-in
API key
Format
REST
Endpoints
1

Compiled by OSINTtools.io editors from docs.apilayer.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

ipstack returns geolocation data for an IP address: continent, country, region, city, coordinates, time zone, currency, and connection details such as ASN and ISP. With the security option on a plan that includes it, the response also carries proxy, Tor, crawler and threat fields.

Calls are GET requests to https://api.ipstack.com/ with the address in the path and your key in the access_key query parameter. Responses are JSON by default, or XML with output=xml. Failed calls return JSON with success: false and an error object.

The docs also describe a bulk lookup (up to 50 addresses per request, on plans that support it) and a lookup of the requester's own address; their paths are not spelled out on the pages read, so only the standard lookup is documented here. A monthly request limit applies; error 104 is returned when it is reached.

Quick start

  1. Get a key

    Create an account with ipstack and copy your api key. Where to get it

  2. Make your first request

    Geolocation, time zone, currency and connection data for one IP address.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.ipstack.com/203.0.113.7?access_key=YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this, shortened.

    {
      "ip": "203.0.113.7",
      "type": "ipv4",
      "city": "Exampleville",
      "zip": "00000",
      "latitude": 12.3456,
      "longitude": 65.4321,
      "location": {
        "capital": "Example City",
        "calling_code": "1",
        "is_eu": false
      },
      "time_zone": {
        "id": "America/New_York",
        "current_time": "2026-11-29T10:00:00-05:00",
        "gmt_offset": -18000
      },
      "currency": {
        "code": "USD",
        "name": "US Dollar"
      },
      "connection": {
        "asn": 64496,
        "isp": "Example ISP"
    …

Authentication

Send your API key in the access_key query parameter of every request.

Plans include HTTPS.

Get a key from ipstack

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

A monthly request volume applies per plan; per-second limits are not stated in the docs

Errors

StatusMeaning
101missing_access_key or invalid_access_key
102inactive_user: the account is not active
103invalid_api_function: the endpoint does not exist
104usage_limit_reached: the monthly request limit is reached
301invalid_fields: invalid value in the fields parameter
302too_many_ips: more than 50 addresses in a bulk request
303batch_not_supported_on_plan: bulk lookup is not on the plan
404404_not_found: the requested resource does not exist

Lookup

Returns the location and network data held for the address. Add hostname=1 for the reverse-DNS hostname (off by default, may slow responses). security=1 adds a security object and needs the Professional Plus plan.

Path parameters

ipstringrequiredtakes your ip address

IPv4 or IPv6 address to look up

Example: 203.0.113.7

Query parameters

fieldsstring

Comma-separated objects to return, e.g. main, country_code, location, location.capital

Example: country_code,location.capital
hostnameinteger

Set to 1 to include the hostname the address resolves to

Example: 1One of: 0, 1
securityinteger

Set to 1 to include the security object (Professional Plus plan)

Example: 1One of: 0, 1
languagestring

Two-letter language code for the results

Example: enDefault: enOne of: en, de, es, fr, ja, pt-br, ru, zh
outputstring

Response format

Example: jsonDefault: jsonOne of: json, xml
Response fields · 21Show

ipstring

The address looked up

hostnamestring

Resolved hostname, when requested

typestring

Address type

citystring

City

zipstring

Postal code

latitudenumber

Latitude

longitudenumber

Longitude

capitalstring

Capital of the country

calling_codestring

International calling code

is_euboolean

Whether the country is in the EU

idstring

Time zone identifier

current_timestring

Current time at the location

gmt_offsetinteger

Offset from GMT in seconds

codestring

Currency code

namestring

Currency name

asninteger

Autonomous system number

ispstring

Internet service provider

is_proxyboolean

Whether the address is a known proxy

is_torboolean

Whether the address is a Tor node

is_crawlerboolean

Whether the address belongs to a crawler

threat_levelstring

Threat level assigned to the address

curl 'https://api.ipstack.com/203.0.113.7?access_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "ip": "203.0.113.7",
  "type": "ipv4",
  "city": "Exampleville",
  "zip": "00000",
  "latitude": 12.3456,
  "longitude": 65.4321,
  "location": {
    "capital": "Example City",
    "calling_code": "1",
    "is_eu": false
  },
  "time_zone": {
    "id": "America/New_York",
    "current_time": "2026-11-29T10:00:00-05:00",
    "gmt_offset": -18000
  },
  "currency": {
    "code": "USD",
    "name": "US Dollar"
  },
  "connection": {
    "asn": 64496,
    "isp": "Example ISP"
  }
}