Endpoint Version: 2.0.0 | Cost: ₹0.00 per call
Lookup location coordinates and regional data for a specific IP address.
| Header Name | Value / Type | Description |
|---|---|---|
| X-API-Key | string |
your_api_key |
| Parameter Name | Required Type | Constraint |
|---|---|---|
| ip | string |
IPV4 or IPV6 address |
| Header | Sample Value |
|---|---|
| Content-Type | application/json; charset=utf-8 |
| X-Execution-Time-Ms | 45.82 ms |
const axios = require('axios');
axios.post('https://api.rsprint.site/api/v1/gateway/geo-lookup', [], {
headers: {
'X-API-Key': 'YOUR_API_KEY',
'X-API-Secret': 'YOUR_API_SECRET'
}
}).then(res => console.log(res.data));
import requests
url = 'https://api.rsprint.site/api/v1/gateway/geo-lookup'
headers = {
'X-API-Key': 'YOUR_API_KEY',
'X-API-Secret': 'YOUR_API_SECRET'
}
response = requests.post(url, json=[], headers=headers)
print(response.json())
<?php
$url = 'https://api.rsprint.site/api/v1/gateway/geo-lookup';
$headers = [
'X-API-Key: YOUR_API_KEY',
'X-API-Secret: YOUR_API_SECRET',
'Content-Type: application/json'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '[]');
$res = curl_exec($ch);
echo $res;
{
"status": "success",
"data": {
"ip": "8.8.8.8",
"country": "United States",
"region": "California",
"city": "Mountain View",
"zip": "94043",
"isp": "Google LLC"
}
}
{
"status": "error",
"message": "IP address target is blank"
}