API Endpoint

URL:

https://pinip.net/api?format=json&ip=8.8.8.8

Usage Examples

Get information for a specific IP address

https://pinip.net/api?format=json&ip=8.8.8.8

Get information for your own IP (no IP parameter)

https://pinip.net/api?format=json

Response Format

The API returns JSON data in the same format as ipwhois.app:

{
  "ip": "8.8.8.8",
  "success": true,
  "type": "IPv4",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "country_flag": "https://cdn.ipwhois.io/flags/us.svg",
  "country_capital": "Washington",
  "country_phone": "+1",
  "country_neighbours": "CA,MX,CU",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4056,
  "longitude": -122.0775,
  "asn": "AS15169",
  "org": "Google LLC",
  "isp": "Google LLC",
  "timezone": "America/Los_Angeles",
  "timezone_name": "Pacific Standard Time",
  "timezone_dstOffset": 3600,
  "timezone_gmtOffset": -28800,
  "timezone_gmt": "GMT -8:00",
  "currency": "USD",
  "currency_code": "USD",
  "currency_symbol": "$",
  "currency_rates": 1,
  "currency_plural": "US dollars"
}

Parameters

Parameter Required Description
format Yes Must be "json" to get JSON output
ip No IP address to lookup (IPv4 or IPv6). If not provided, returns your own IP information.

Error Response

If an error occurs, the API returns:

{
  "success": false,
  "message": "Invalid IP address"
}

Rate Limits

This API is free to use. We recommend reasonable usage limits to ensure service availability for all users. For heavy usage, please contact us.

Note: This API uses a third-party service (ipwhois.app) which may have monthly usage limits. If you receive a "monthly limit" error, please try again later or contact us for alternative solutions.

Try It Now