IP Geocoding

IP Geocoding API

The IP Geocoding API allows you to get the location of an IP address. The API returns the latitude and longitude of the IP address, as well as the city, state, country, and postal code. The API also returns the timezone, ISP, and organization of the IP address.

The API is free to use, but you must register for an API key. The API key is free and does not require a credit card.

The API is available at https://tinyapi.co/apis/ip-geocoding/ (opens in a new tab). The API documentation is available at https://docs.tinyapi.co/apis/ip-geocoding/ (opens in a new tab).

Sample API Request

import requests
 
headers = {
    'Authorization': 'Api-Key YOUR_API_KEY'
}
 
response = requests.get('https://api.tinyapi.co/v1/ip-geocoding/49.207.196.170/', headers=headers)
 
if response.status_code == 200:
    print(response.json())
else:
    print(f"Error: {response.status_code}")

Sample API Response

{
    "ip": "49.207.196.170",
    "countryCode": "IN",
    "countryName": "India",
    "regionCode": "KA",
    "regionName": "Karnataka",
    "city": "Bengaluru",
    "postalCode": "560008",
    "latitude": 12.9634,
    "longitude": 77.5855,
    "accuracyRadius": 500,
    "timeZone": "Asia/Kolkata",
    "phoneCode": "+91",
    "connection": {
        "asn": null,
        "isp": null,
        "organization": null,
        "domain": null,
        "isHostingProvider": false,
        "isPublicProxy": false,
        "isTorExitNode": false,
        "userType": null
    },
    "security": {
        "isProxy": false,
        "isCrawler": false,
        "proxyType": null,
        "crawlerName": null
    }
}

Integration

Easily integrate Tiny API into your projects

Integrating Tiny API into your projects is a straightforward process. Follow these simple steps, and you'll have the power of Tiny API at your fingertips.

Step 1: Sign Up and Get Your API Key

To get started with Tiny API, you'll first need to sign up for an account on our website. Once you've signed up, you'll receive an API key, which you'll need to include in your API requests for authentication.

Step 2: Choose Your API

Next, you'll need to choose the API you want to integrate into your project. Explore our extensive catalog of APIs, and find the one that best suits your needs. Make sure to familiarize yourself with the API documentation, which includes important information on the available endpoints, request parameters, and response formats.

Step 3: Make API Requests

With your API key and chosen API in hand, you're now ready to start making API requests. You can use any programming language or tool that supports HTTP requests to make calls to the Tiny API endpoints. Remember to include your API key in the request headers for authentication.

Here's a sample API request using Python and the popular requests library:

import requests
 
api_key = "your_api_key"
url = "https://api.tinyapi.co/v1/ip-geocoding/49.207.196.170/"
headers = {"Authorization": f"Api-Key {api_key}"}
 
response = requests.get(url, headers=headers)
 
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Error: {response.status_code}")