IP Address Validator avatar

IP Address Validator

Pricing

Pay per event

Go to Apify Store
IP Address Validator

IP Address Validator

This actor validates IP addresses and classifies them as IPv4 or IPv6, public or private, loopback, multicast, or link-local. Useful for network security auditing, data cleaning, and IP address analysis.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Validate and classify IPv4/IPv6 addresses.

What does IP Address Validator do?

This actor validates IP addresses and classifies them as IPv4 or IPv6, public or private, loopback, multicast, or link-local. It accepts any string input and determines whether it is a valid IP address, which version it is, and what type of address it represents.

Useful for network security auditing, data cleaning, log analysis, and IP address classification at scale.

Use cases

  • Security engineers -- validate and classify IP addresses extracted from firewall logs to identify private vs. public traffic patterns
  • Data engineers -- clean IP address columns in datasets by filtering out invalid, private, or loopback addresses
  • Network administrators -- audit IP address inventories to verify correct classification and identify misconfigurations
  • DevOps teams -- validate IP address lists before configuring allowlists or blocklists in infrastructure automation
  • Compliance analysts -- classify IP addresses in audit logs to determine which traffic involves public internet vs. internal network

Why use IP Address Validator?

  • Comprehensive classification -- identifies public, private, loopback, multicast, and link-local addresses in one pass
  • IPv4 and IPv6 support -- validates both IPv4 (e.g., 8.8.8.8) and IPv6 (e.g., 2001:db8::1) addresses
  • Batch processing -- validate thousands of IP addresses in a single run
  • Ultra-low cost -- only $0.0005 per IP validated, making large-scale validation extremely affordable
  • Structured JSON output -- each result includes validity, version, type, and detailed classification flags
  • No infrastructure needed -- runs on Apify cloud with no servers to set up or maintain

Input parameters

ParameterTypeRequiredDefaultDescription
ipAddressesarray of stringsYes--List of IP addresses to validate. Supports IPv4 and IPv6 formats.
{
"ipAddresses": ["8.8.8.8", "192.168.1.1", "::1", "256.1.2.3"]
}

Output example

Each IP address produces a result object:

FieldTypeDescription
inputstringThe original IP address
isValidbooleanWhether the address is valid
versionnumberIP version (4 or 6), null if invalid
typestringAddress type: public, private, loopback, multicast, link-local
isPrivatebooleanWhether the address is in a private range
isLoopbackbooleanWhether the address is a loopback address
isMulticastbooleanWhether the address is a multicast address
isLinkLocalbooleanWhether the address is link-local
errorstringError message if validation failed
{
"input": "8.8.8.8",
"isValid": true,
"version": 4,
"type": "public",
"isPrivate": false,
"isLoopback": false,
"isMulticast": false,
"isLinkLocal": false,
"error": null
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
IP validated$0.0005Per IP address validated

Example costs:

  • 100 IPs: $0.035 + 100 x $0.0005 = $0.085
  • 1,000 IPs: $0.035 + 1,000 x $0.0005 = $0.535
  • 10,000 IPs: $0.035 + 10,000 x $0.0005 = $5.035

Using the Apify API

You can start IP Address Validator programmatically from your own applications using the Apify API. The following examples show how to run the actor and retrieve results.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/ip-address-validator').call({
ipAddresses: ['8.8.8.8', '192.168.1.1', '::1'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/ip-address-validator').call(run_input={
'ipAddresses': ['8.8.8.8', '192.168.1.1', '::1'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

IP Address Validator works with all major integration platforms supported by Apify. Connect it to Make (formerly Integromat), Zapier, n8n, or Slack to build automated IP validation workflows. Export results directly to Google Sheets for collaborative analysis or use webhooks to trigger downstream actions when validation completes. You can also chain this actor with the IP Geolocation Lookup actor to both validate and geolocate IP addresses in one pipeline.

Common integration patterns include:

  • Google Sheets -- export validated IP addresses with their classifications to a spreadsheet for network inventory management
  • Slack -- receive alerts when IP validation runs detect unexpected private or invalid addresses in your datasets
  • Zapier / Make -- automatically validate IP addresses extracted from log files or form submissions
  • Webhooks -- receive results via POST request for real-time IP classification in your security monitoring systems

Tips and best practices

  • Pre-filter your data -- if you have a mixed dataset with some strings that are clearly not IP addresses (e.g., hostnames or URLs), filter them out before passing to this actor to save on costs. The actor will handle invalid inputs gracefully but you still pay per item.
  • Use the type field for quick filtering -- the type field provides a single-value classification (public, private, loopback, etc.) that is easier to filter on than checking multiple boolean flags.
  • Combine with IP Geolocation -- after validating IPs, pass the valid public addresses to the IP Geolocation Lookup actor to get country, city, and ISP information.
  • Batch your requests -- processing all IPs in a single run is more cost-effective, since the $0.035 start fee is charged only once per run.
  • Check for IPv6 readiness -- use the version field to determine what percentage of your IP addresses are IPv6, which is useful for network modernization planning.
  • Export for compliance -- download results as CSV or JSON from the Apify dataset for inclusion in security audit reports or network documentation.
  • Deduplicate inputs -- remove duplicate IP addresses from your input list before running the actor to avoid paying for redundant validations.

FAQ

What IP address ranges are considered private? Private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 as defined in RFC 1918. For IPv6, unique local addresses (fc00::/7) are considered private.

What happens if I pass an invalid string? The actor returns a result with isValid: false, version: null, and an error field describing why the input is not a valid IP address. Invalid inputs do not cause the run to fail.

Can I validate CIDR notation (e.g., 192.168.1.0/24)? This actor validates individual IP addresses, not CIDR ranges. Pass individual addresses without the subnet mask for validation.

What is a loopback address? A loopback address is used to send traffic to the local machine. For IPv4, the loopback address is 127.0.0.1 (and the entire 127.0.0.0/8 range). For IPv6, the loopback address is ::1. These addresses are used for local testing and never appear on a network.

What is a link-local address? Link-local addresses are automatically assigned to network interfaces and are only valid on the local network segment. For IPv4, the range is 169.254.0.0/16. For IPv6, the range is fe80::/10. These addresses cannot be routed across networks and are commonly seen when DHCP is unavailable.

What is a multicast address? Multicast addresses are used to send data to multiple recipients simultaneously. For IPv4, the multicast range is 224.0.0.0/4. For IPv6, multicast addresses start with ff00::/8. These addresses are used for network protocols, streaming, and group communication rather than regular point-to-point traffic.