Over 60 million real residential IPs from genuine users across 190+ countries.
Over 60 million real residential IPs from genuine users across 190+ countries.
Your First Plan is on Us!
Get 100% of your first residential proxy purchase back as wallet balance, up to $900.
PROXY SOLUTIONS
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
Guaranteed bandwidth — for reliable, large-scale data transfer.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Get accurate and in real-time results sourced from Google, Bing, and more.
Execute scripts in stealth browsers with full rendering and automation
No blocks, no CAPTCHAs—unlock websites seamlessly at scale.
Get instant access to ready-to-use datasets from popular domains.
PROXY PRICING
Full details on all features, parameters, and integrations, with code samples in every major language.
LEARNING HUB
ALL LOCATIONS Proxy Locations
TOOLS
RESELLER
Get up to 50%
Contact sales:partner@thordata.com
Proxies $/GB
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
Guaranteed bandwidth — for reliable, large-scale data transfer.
Scrapers $/GB
Fetch real-time data from 100+ websites,No development or maintenance required.
Get real-time results from search engines. Only pay for successful responses.
Execute scripts in stealth browsers with full rendering and automation.
Bid farewell to CAPTCHAs and anti-scraping, scrape public sites effortlessly.
Dataset Marketplace Pre-collected data from 100+ domains.
Data for AI $/GB
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Pricing $0/GB
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Docs $/GB
Full details on all features, parameters, and integrations, with code samples in every major language.
Resource $/GB
EN
首单免费!
首次购买住宅代理可获得100%返现至钱包余额,最高$900。
代理 $/GB
数据采集 $/GB
AI数据 $/GB
定价 $0/GB
产品文档
资源 $/GB
简体中文$/GB
Blog
Proxies
IP addresses are fundamental to how the internet works. They serve as unique identifiers for devices communicating over the network. In this guide, we will explore what an IP address is, how you can generate random IPs programmatically, and how these addresses can help protect your identity online. By the end, you will understand how to build a random IP generator and use it effectively for various purposes, including web scraping and maintaining anonymity.
An IP (Internet Protocol) address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It serves as the digital address of a device, enabling it to send and receive data over the internet.
There are two main versions of IP addresses: IPv4 and IPv6.
● IPv4: The most commonly used version today, consisting of four octets (groups of numbers), each ranging from 0 to 255. For example, 168.1.1is a typical IPv4 address.
● IPv6: A newer version designed to handle the shortage of IP addresses in IPv4. IPv6 uses a much larger address space and a more complex format.
For simplicity, this guide focuses primarily on IPv4 addresses. Each of the four numbers (octets) in an IPv4 address is separated by a dot, and they represent unique values used for identifying devices on a network.
The easiest way to discover your public IP address is to visit a site like “What is my IP address.” Alternatively, on Windows, you can find your IP by launching the following command in the terminal:ipconfig
● Identification: IP addresses identify devices on a network, making it possible for them to communicate with one another.
● Routing: They help in routing the data between devices across different networks.
● Geolocation: IP addresses are also used in geolocation services to estimate a user’s physical location, based on their public IP.
Generating random IP addresses is not only feasible, but it’s also a relatively straightforward process. Given that IP addresses follow a structured format, you can programmatically generate valid IPv4 addresses. However, there are specific ranges of IPs that should be avoided, as they are reserved for special purposes (e.g., private networks, loopback addresses, etc.).
IP addresses are managed by the IANA (Internet Assigned Numbers Authority) and distributed by RIRs (Regional Internet Registries). They follow a set of rules regarding allocation, meaning certain IP ranges are reserved for specific uses. For example:
● Private IP Ranges: Used for internal networks (e.g., 168.0.0 – 192.168.255.255).
● Loopback IPs: Used by the computer to refer to itself (e.g., 0.0.0 – 127.255.255.255).
● Reserved IPs: Certain ranges are reserved for future use or special functions, such as 0.0.0/8for local networks.
Avoiding these reserved ranges is essential when creating random IPs for use in applications like web scraping or privacy protection.
|
Address Block |
Address Range |
Description |
|
|
|
Current (local, “this”) network |
|
|
|
Used for local communications within a private network |
|
|
|
Shared address space for service provider and subscriber communication with carrier-grade NAT |
|
|
|
Used for loopback addresses to the local host |
|
|
|
Used for link-local addresses when no IP is specified (e.g., DHCP failure) |
|
|
|
Used for local communications within a private network |
|
|
|
IETF Protocol Assignments, DS-Lite (/29) |
|
|
|
Assigned as TEST-NET-1, for documentation and examples |
|
|
|
Reserved. Formerly used for IPv6 to IPv4 relay |
|
|
|
Used for local communications within a private network |
|
|
|
Used for benchmark testing of inter-network communications between separate subnets |
|
|
|
Assigned as TEST-NET-2, for documentation and examples |
|
|
|
Assigned as TEST-NET-3, for documentation and examples |
|
|
|
In use for multicast (former Class D network) |
|
|
|
Assigned as MCAST-TEST-NET, for documentation and examples (part of multicast space) |
|
|
|
Reserved for future use (former Class E network) |
255.255.255.255/32 |
255.255.255.255 |
Reserved for the “limited broadcast” destination address |
Now that you understand how IPs work and the rules around valid addresses, let’s walk through the steps to build a random IPv4 address generator using Python.
In Python, you can use the random.randint() function to generate random numbers between 0 and 255 for each octet in an IPv4 address. Here’s how:
import random
def generate_random_ipv4():
return f”{random.randint(0, 255)}.{random.randint(0, 255)}.{random.randint(0, 255)}.{random.randint(0, 255)}”
This function generates a random IP address, where each octet is a random number between 0 and 255.
Not all IP addresses are available for use, so we need to exclude the reserved ones. Python’s ipaddress module can help here. The module provides a built-in IPv4Address class that can identify whether an IP address is reserved.
import random
import ipaddress
def generate_random_ipv4():
while True:
# Generate a random IP address
ip = f”{random.randint(0, 255)}.{random.randint(0, 255)}.{random.randint(0, 255)}.{random.randint(0, 255)}”
# Check if the generated IP is reserved
if not ipaddress.IPv4Address(ip).is_reserved:
return ip
This function continues generating random IPs until it finds one that is not reserved.
Once the function is ready, you can test it by calling the function and printing the result:
ip = generate_random_ipv4()
print(ip)
This will return a valid random IP address, for example, 61.18.2.4.
You may wonder why you would want to generate random IP addresses. The key reason is online anonymity. Random IP addresses can be used to mask your identity when browsing the internet, conducting research, or scraping websites. Here’s how:
When scraping websites, many sites use methods like rate limiting, CAPTCHA challenges, or IP blocking to prevent bots. By rotating IPs, you can avoid detection and ensure uninterrupted data scraping.
IP rotation involves using a pool of IP addresses to disguise the source of requests. Instead of always sending requests from the same IP address, a proxy service can rotate through a set of different IPs, making it appear as if multiple users are accessing the target site.
Using random IPs is essential for maintaining anonymity, and there are several tools and techniques you can employ to achieve this.
A proxy server acts as an intermediary between your device and the target server. Using proxies, you can rotate through multiple IPs from a proxy pool to bypass anti-scraping measures like rate-limiting or IP blocking. Here’s an example using Python:
import requests
import random
# Pool of proxies
proxies = [
“<PROXY_URL_1>”,
“<PROXY_URL_2>”,
“<PROXY_URL_3>”
]
# Get a random proxy config
def get_random_proxy():
return {“http”: random.choice(proxies), “https”: random.choice(proxies)}
# Example usage
proxy = get_random_proxy()
response = requests.get(“https://example.com”, proxies=proxy)
Thordata operates the world’s best proxy servers, serving Fortune 500 companies and over 20,000 customers. Its worldwide proxy network involves:
● Datacenter proxies – Over 650,000 datacenter IPs.
● Residential proxies – Over 60M residential IPs in more than 195 countries.
● ISP proxies – Over 550,000 ISP IPs.
● Mobile proxies – Over 60,0000 mobile IPs.
For large-scale scraping projects, using a web scraping API with built-in IP rotation is an excellent solution. These services handle proxies, CAPTCHA, and other anti-bot measures, so you can focus on data collection without worrying about technical setup.
Discover why Thordata’s Scraper API is one of the best web scraping solutions, offering advanced anti-bot management, IP rotation, data scheduling, and much more.
In this guide, we’ve covered the basics of IP addresses, how to generate random IPs programmatically, and how to use them to enhance your online anonymity. While generating random IPs is a fun and educational exercise, the real-world application comes with proxy servers for IP rotation, allowing you to mask your identity and bypass restrictions.
For those seeking a robust and scalable solution, Thordata provides high-quality proxy services to help you manage IP rotation seamlessly. With a vast pool of residential and datacenter proxies, Thordata ensures reliability and anonymity for your web scraping and online privacy needs.
Frequently asked questions
How can I hide my IP address while browsing?
You can use proxies to hide your real IP address. Proxies allow you to route your traffic through servers in different locations, effectively masking your identity.
Can I use random IPs for web scraping?
Yes, using random IPs or rotating IPs from proxy servers is an effective way to avoid being detected by websites during scraping.
What’s the benifits of a proxy for IP rotation?
Thordata offers powerful proxy solutions for your data collection needs. Try their services today for seamless, anonymous web scraping with rotating IPs.
About the author
Jenny is a Content Manager with a deep passion for digital technology and its impact on business growth. She has an eye for detail and a knack for creatively crafting insightful, results-focused content that educates and inspires. Her expertise lies in helping businesses and individuals navigate the ever-changing digital landscape.
The thordata Blog offers all its content in its original form and solely for informational intent. We do not offer any guarantees regarding the information found on the thordata Blog or any external sites that it may direct you to. It is essential that you seek legal counsel and thoroughly examine the specific terms of service of any website before engaging in any scraping endeavors, or obtain a scraping permit if required.
Looking for
Top-Tier Residential Proxies?
您在寻找顶级高质量的住宅代理吗?
How to Use cURL to Download Files: Comprehensive Guide
Mastering cURL for File Downloads: Commands, Options, and Best Practices.
Yulia
2025-12-25
Top 10 Anti-Detect Browsers for 2026: Best Tools for Multi-Account Management and Privacy
2025-12-22
Best Anti-detect Browser—BitBrowser for Multi-accounting
BitBrowser can be used in various cross-border business scenarios. Using BitBrowser, you can log in to more accounts without any association with each other.
Jenny
2025-12-22