IP Geolocation
This endpoint allows you to instantly retrieve geographic data, time zone information, and organization (ISP) details for a specific IP address.
Endpoint
POST https://api.zapifyapi.com/v1/{api_token}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| api_token | string | Required. Your unique API access token. |
Request Body
The request expects a JSON object.
| Key | Type | Description |
|---|---|---|
| target_ip | string | Required. The IP address you want to look up (IPv4). |
Example Request
cURL
curl -X POST "https://api.zapifyapi.com/v1/YOUR_API_TOKEN"
-H "Content-Type: application/json"
-d '{
"target_ip": "1.1.1.1"
}'
Node.js
const axios = require("axios");
const payload = {
target_ip: "1.1.1.1"
};
axios.post("https://api.zapifyapi.com/v1/YOUR_API_TOKEN", payload)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
Response
Returns a JSON object with the location details.
{
"ip": "1.1.1.1",
"city": "Hong Kong",
"region": "Central and Western District",
"country": "Hong Kong",
"loc": "22.3193,114.1693",
"org": "Cloudflare, Inc",
"timezone": "Asia/Hong_Kong"
}