IP Lookup API

Comprehensive IP address lookup service with detailed geolocation, network information, and security analysis

Authentication

All API requests require authentication using an API key. You can create an API key in your dashboard.

Include your API key in the Authorization header of your requests:

Authorization: Bearer your_api_key

Credit Usage

Each API call consumes credits from your account. This service costs 2 credits per call.

Endpoints

POST/api/v1/ip-lookup2 credits

Retrieve detailed information about a specified IP address

Basic IP Lookup

Lookup detailed information about a specific IP address.

curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"ip": "8.8.8.8"}'

Detailed IP Lookup with Analysis

Include detailed analysis and security information about the IP address.

curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "ip": "8.8.8.8",
    "includeDetails": true
  }'

Simple IP Lookup

Get basic information without detailed analysis to save processing time.

curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "ip": "1.1.1.1",
    "includeDetails": false
  }'

Request Parameters

ParameterTypeRequiredDescription
ipstringYesThe IP address to lookup (IPv4 or IPv6)
includeDetailsbooleanNoInclude detailed analysis (default: true)

Example Response

{
  "success": true,
  "data": {
    "ip": "8.8.8.8",
    "location": {
      "country": {
        "code": "US",
        "name": "United States"
      },
      "region": {
        "code": "CA",
        "name": "California"
      },
      "city": "Mountain View",
      "postal": "94043",
      "latitude": 37.4056,
      "longitude": -122.0775,
      "timezone": "America/Los_Angeles",
      "continent": {
        "code": "NA",
        "name": "North America"
      }
    },
    "network": {
      "asn": 15169,
      "organization": "GOOGLE"
    },
    "lookup": {
      "requestedIp": "8.8.8.8",
      "ipType": "IPv4",
      "isPublic": true,
      "isPrivate": false,
      "reverseDns": null
    },
    "analysis": {
      "geolocation": {
        "accuracy": "city-level",
        "confidence": "high",
      },
      "network": {
        "type": "identified",
        "provider": "GOOGLE",
        "asnInfo": "AS15169"
      },
      "security": {
        "riskLevel": "unknown",
        "isKnownProxy": false,
        "isKnownVpn": false
      },
      "usage": {
        "commonUse": "Search Engine / Cloud Services",
        "category": "Hosting"
      }
    },
    "timestamp": "2025-01-18T16:02:58.128Z"
  },
  "meta": {
    "requestTime": "2025-01-18T16:02:58.128Z",
    "processingTime": 245,
    "creditsUsed": 1
  }
}

Response Fields

Location Information

  • country: Country code and name
  • region: State/province code and name
  • city: City name
  • postal: Postal/ZIP code
  • latitude/longitude: Geographic coordinates
  • timezone: IANA timezone identifier
  • continent: Continent code and name

Network Information

  • asn: Autonomous System Number
  • organization: Network organization name

Lookup Information

  • requestedIp: The IP address that was looked up
  • ipType: IPv4 or IPv6
  • isPublic: Whether the IP is publicly routable
  • isPrivate: Whether the IP is in a private range
  • reverseDns: Reverse DNS lookup result (if available)

Analysis Information (when includeDetails=true)

  • geolocation: Accuracy and confidence information
  • network: Network provider and ASN details
  • security: Security-related information
  • usage: Common use cases and IP category

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request. Error responses include a JSON object with an error message.

{
  "error": "Error message"
}

Common Status Codes

  • 200 OK: The request was successful
  • 400 Bad Request: Invalid IP address format or missing IP parameter
  • 401 Unauthorized: Invalid or missing API key
  • 402 Payment Required: Insufficient credits
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Something went wrong on the server

Use Cases

Security Analysis

Analyze IP addresses for security threats, proxy detection, and risk assessment.

Geolocation Services

Provide location-based services and content localization based on IP geolocation.

Network Analysis

Identify network providers, ASN information, and network infrastructure details.

Fraud Prevention

Detect suspicious IP addresses and implement fraud prevention measures.

Try Our APIs
Use our API Playground to test and explore our APIs. Make sure you are logged in to access this feature.