API Access Key & Authentication
Your API Access Key is your unique authentication key used to gain access to the IPstack API. In order to authenticate with the API, append the access_key parameter to the API's base URL and set it to your access key value.
You can gain access to the IPstack API by simply adding your access_API_key in the base URL as a query parameter. For example,
Base URL:
https://api.ipstack.com/Append your API Access Key: Here is an example API call illustrating how to authenticate with the IPstack API:
https://api.ipstack.com/134.201.250.155
? access_key = YOUR_ACCESS_KEYSign Up to Run API Request
API Response
Choosing How You Want Your Data
The IPstack API can return information in two formats: JSON (the default) or XML. Below is an example of what the IPstack API would return when you ask it about the IP address 134.201.250.155 using the API call mentioned in the previous section
{
"ip": "134.201.250.155",
"hostname": "134.201.250.155",
"type": "ipv4",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"region_code": "CA",
"region_name": "California",
"city": "Los Angeles",
"zip": "90013",
"latitude": 34.0655,
"longitude": -118.2405,
"msa": "31100",
"dma": "803",
"radius": null,
"ip_routing_type": null,
"connection_type": null,
"location": {
"geoname_id": 5368361,
"capital": "Washington D.C.",
"languages": [
{
"code": "en",
"name": "English",
"native": "English"
}
],
"country_flag": "https://assets.ipstack.com/images/assets/flags_svg/us.svg",
"country_flag_emoji": "🇺🇸",
"country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
"calling_code": "1",
"is_eu": false
},
"time_zone": {
"id": "America/Los_Angeles",
"current_time": "2024-06-14T01:45:35-07:00",
"gmt_offset": -25200,
"code": "PDT",
"is_daylight_saving": true
},
"currency": {
"code": "USD",
"name": "US Dollar",
"plural": "US dollars",
"symbol": "$",
"symbol_native": "$"
},
"connection": {
"asn": 25876,
"isp": "Los Angeles Department of Water & Power",
"sld": "ladwp",
"tld": "com",
"carrier": "los angeles department of water & power",
"home": null,
"organization_type": null,
"isic_code": null,
"naics_code": null
},
"security": {
"is_proxy": false,
"proxy_type": null,
"is_crawler": false,
"crawler_name": null,
"crawler_type": null,
"is_tor": false,
"threat_level": "low",
"threat_types": null,
"proxy_last_detected": null,
"proxy_level": null,
"vpn_service": null,
"anonymizer_status": null,
"hosting_facility": false
}
}API responses come with comprehensive location-related data, currency-related data, timezone-related data, connection-related data and security-related data. Throughout the Response Objects section, you will learn more about the given response structure and its objects.
Please note: For illustration purposes we have included both Hostname Lookup and the Security Module in the above API response. Please refer to the sections Hostname Lookup and Security Module for details.
Available Endpoints
The IPstack API offers three different endpoints, each accepting a different set of parameters and returning different results. Click on the headings below to jump to the respective endpoint's description.