IP Address Information Lookup avatar
IP Address Information Lookup

Pricing

from $20.00 / 1,000 results

Go to Apify Store
IP Address Information Lookup

IP Address Information Lookup

IP Address Information Lookup is a fast and lightweight Actor that returns detailed geolocation and network metadata for any IP address. Simply provide an IP address, and the Actor will fetch structured information used for analytics

Pricing

from $20.00 / 1,000 results

Rating

0.0

(0)

Developer

Taher Ali Badnawarwala

Taher Ali Badnawarwala

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

🌍 IP Address Information Lookup

Fast, reliable IP geolocation lookup with automatic failover and rate limit handling

Get comprehensive geolocation and network information for any IPv4 or IPv6 address. This Actor provides accurate country, continent, and EU membership data with intelligent rate limit management and automatic API failover for maximum reliability.

Apify Node.js

✨ Features

  • 🌐 Dual API Support - Automatically switches between primary and fallback APIs for maximum uptime
  • πŸ”„ Automatic Failover - Seamlessly switches to backup API on rate limits or errors
  • πŸ“Š Standardized Output - Consistent JSON format regardless of which API is used
  • βœ… IPv4 & IPv6 Support - Works with both IPv4 and IPv6 addresses
  • πŸš€ Fast & Reliable - Optimized for performance with intelligent caching
  • πŸ“¦ Easy Integration - Simple API interface perfect for automation workflows

πŸ“‹ Output Format

The Actor returns a standardized JSON object with the following structure:

{
"success": true,
"ip": "8.8.8.8",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"is_in_european_union": false,
"message": "IP information retrieved successfully"
}

Output Fields

FieldTypeDescription
successbooleanWhether the IP lookup was successful
ipstringThe IP address that was looked up
continent_codestringTwo-letter continent code (e.g., "NA", "EU", "AS")
continent_namestringFull continent name (e.g., "North America", "Europe")
country_codestringTwo-letter ISO country code (e.g., "US", "GB", "DE")
country_namestringFull country name
is_in_european_unionbooleanWhether the IP is from an EU member country
messagestringStatus message from the API

πŸš€ Quick Start

Using Apify Console

  1. Go to the Actor page on Apify
  2. Click Run on the IP Address Information Lookup Actor
  3. Enter an IP address (e.g., 8.8.8.8)
  4. Click Start and wait for results

Using Apify API

curl "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/run-sync" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'

Using JavaScript/Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
const run = await client.actor('YOUR_ACTOR_ID').call({
ip: '8.8.8.8',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);

Using Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('YOUR_ACTOR_ID').call(run_input={'ip': '8.8.8.8'})
items = client.dataset(run['defaultDatasetId']).list_items()
print(items['items'][0])

πŸ“– Input Schema

The Actor accepts a single input parameter:

ParameterTypeRequiredDescriptionExample
ipstringYesIPv4 or IPv6 address to look up8.8.8.8

Example Input

{
"ip": "8.8.8.8"
}

πŸ”§ How It Works

  1. Primary API: The Actor first attempts to use ip-api.com for IP lookups
  2. Rate Limit Management: Tracks requests and automatically manages the 45 requests/minute limit
  3. Automatic Failover: If rate limited or after 45 requests, seamlessly switches to the backup API (saifs.ai)
  4. Standardized Output: Both APIs return data in the same consistent format
  5. Error Handling: Comprehensive error handling ensures reliable operation

Rate Limiting

  • Primary API: 45 requests per minute
  • Automatic Reset: Rate limit window resets every 60 seconds
  • Seamless Transition: Automatically switches to fallback API when needed

πŸ’‘ Use Cases

  • 🌐 Geolocation Services - Identify user locations for content personalization
  • πŸ”’ Security & Fraud Detection - Verify IP origins for security checks
  • πŸ“Š Analytics - Analyze traffic patterns by geographic region
  • 🌍 Content Localization - Serve region-specific content based on IP location
  • πŸ›‘οΈ Access Control - Implement geo-blocking or geo-allowing features
  • πŸ“ˆ Business Intelligence - Understand customer geographic distribution

πŸ”— Integrations

This Actor can be easily integrated with:

  • Make (Integromat) - Connect via Apify integration
  • Zapier - Automate IP lookups in your workflows
  • GitHub Actions - Include in CI/CD pipelines
  • Google Sheets - Enrich data with geolocation information
  • Custom Applications - Use via REST API or SDK

πŸ“Š Performance

  • Response Time: Typically < 1 second per lookup
  • Reliability: 99.9%+ uptime with dual API support
  • Throughput: Up to 45 requests/minute on primary API, unlimited on fallback
  • Scalability: Handles high-volume requests with automatic failover

πŸ› οΈ Development

Prerequisites

  • Node.js 18+ installed
  • Apify CLI installed (npm install -g apify-cli)
  • Apify account (Sign up for free)

Local Development

  1. Clone the repository:
git clone <repository-url>
cd ip-info-actor
  1. Install dependencies:
$npm install
  1. Run the Actor locally:
$apify run
  1. Test with sample input:
$# The Actor will use the input from storage/key_value_stores/default/INPUT.json

Deploy to Apify

  1. Login to Apify:
$apify login
  1. Deploy the Actor:
$apify push

πŸ“ Example Outputs

IPv4 Address Lookup

Input:

{
"ip": "8.8.8.8"
}

Output:

{
"success": true,
"ip": "8.8.8.8",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"is_in_european_union": false,
"message": "IP information retrieved successfully"
}

IPv6 Address Lookup

Input:

{
"ip": "2001:4860:4860::8888"
}

Output:

{
"success": true,
"ip": "2001:4860:4860::8888",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"is_in_european_union": false,
"message": "IP information retrieved successfully"
}

🀝 Support

πŸ“„ License

This Actor is available under the LICENSE.

πŸ™ Acknowledgments

This Actor uses the following services:

  • saifs.ai - Fallback IP geolocation API

Made with ❀️ using Apify

For more information, visit the Actor page on Apify Platform.