IpSimple is a straightforward public IP address API designed for seamless integration into any application. Whether you're a developer, IT professional, or a business looking to enhance your network management capabilities, IpSimple provides a reliable and scalable solution for obtaining public IP addresses effortlessly.
- Unlimited Usage: No restrictions on the number of requests you can make. IpSimple can handle anything from a few requests per day to millions per minute.
- Seamless Compatibility: Supports both IPv4 and IPv6 addresses, ensuring compatibility with all modern network configurations and technologies.
- High Availability: Hosted on Microsoft Azure with a multi-zone and multi-region setup, guaranteeing high availability and reliability.
- Open Source Transparency: Completely open source, promoting transparency and community contributions.
- Privacy-Focused: No visitor information is ever logged, ensuring complete anonymity and security.
- Future-Proof and Reliable: Committed to maintaining and improving the service indefinitely.
- Network Management: Obtain public IP addresses programmatically to streamline network management tasks.
- Cloud Infrastructure: Provision new cloud servers with ease by automating the retrieval of public IP addresses.
- Security Applications: Enhance security systems by integrating accurate and up-to-date public IP address information.
- Developer Tools: Build powerful tools and applications requiring public IP address information with minimal setup and effort.
IpSimple provides a simple REST API for retrieving IP address information. You can use it directly via HTTP requests or integrate it into your applications.
The API is hosted at https://api.ipsimple.org
and provides several endpoints:
# Get complete IP information (JSON)
curl https://api.ipsimple.org/api/ip
# Get only IPv4 address
curl https://api.ipsimple.org/api/ip/v4
# Get only IPv6 address
curl https://api.ipsimple.org/api/ip/v6
# Get all detected addresses
curl https://api.ipsimple.org/api/ip/all
The API returns JSON responses with the following structure:
{
"ipv4": "203.0.113.1",
"ipv6": "2001:db8::1",
"allAddresses": [
"203.0.113.1",
"2001:db8::1"
]
}
JavaScript/Node.js:
fetch('https://api.ipsimple.org/api/ip')
.then(response => response.json())
.then(data => console.log('Your IP:', data.ipv4));
Python:
import requests
response = requests.get('https://api.ipsimple.org/api/ip')
ip_info = response.json()
print(f"Your IP: {ip_info['ipv4']}")
C#:
using var client = new HttpClient();
var response = await client.GetStringAsync("https://api.ipsimple.org/api/ip");
var ipInfo = JsonSerializer.Deserialize<IpResponse>(response);
Console.WriteLine($"Your IP: {ipInfo.Ipv4}");
- .NET 9.0 SDK or later
- Docker (optional, for containerized development)
- Git for version control
- A code editor like Visual Studio Code, Visual Studio, or JetBrains Rider
-
Clone the repository:
git clone https://github.com/ipsimple/platform.git cd platform
-
Restore dependencies:
dotnet restore src/IpSimple.Platform.sln
-
Build the solution:
dotnet build src/IpSimple.Platform.sln --configuration Release
-
Run tests:
dotnet test src/IpSimple.Platform.sln
-
Run the API locally:
cd src/IpSimple.PublicIp.Api dotnet run
The API will be available at
https://localhost:5001
orhttp://localhost:5000
-
Build the Docker image:
docker build -f src/IpSimple.PublicIp.Api/Dockerfile -t ipsimple-api src/
-
Run the container:
docker run -p 8080:8080 ipsimple-api
The API will be available at
http://localhost:8080
Once running, you can test the following endpoints:
GET /api/ip
- Get all IP address information in JSON formatGET /api/ip/v4
- Get IPv4 address onlyGET /api/ip/v6
- Get IPv6 address onlyGET /api/ip/all
- Get all detected IP addresses
# Test locally running API
curl http://localhost:5000/api/ip
# Test with specific format
curl http://localhost:5000/api/ip/v4
The IpSimple platform is built with .NET 9.0 and follows a clean architecture pattern:
src/
├── IpSimple.PublicIp.Api/ # Main API application
├── IpSimple.Domain/ # Domain models and constants
├── IpSimple.Extensions/ # HTTP context extensions for IP parsing
├── IpSimple.Domain.Tests/ # Domain layer tests
├── IpSimple.Extensions.Tests/ # Extensions layer tests
├── IpSimple.PublicIp.Api.Tests/ # API layer tests
└── IpSimple.PublicIp.Api.BenchmarkTesting/ # Performance benchmarks
- API Layer: ASP.NET Core Web API with minimal APIs
- Domain Layer: Core business logic and models
- Extensions Layer: HTTP context utilities for IP address extraction
- Performance Optimized: Designed to handle 1000+ requests per second
- Comprehensive Testing: Unit tests and benchmark testing included
This API is optimized for high-throughput scenarios:
- Target Performance: 1000+ requests per second
- Low Memory Usage: Minimal allocation patterns
- Efficient Parsing: Optimized IP address extraction and validation
- Scalable Architecture: Designed for cloud deployment
You can run performance benchmarks using:
cd src/IpSimple.PublicIp.Api.BenchmarkTesting
dotnet run -c Release
We welcome contributions from the community! This project follows standard .NET development practices.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/platform.git cd platform
- Create a feature branch:
git checkout -b feature/your-feature-name
- Set up the development environment:
dotnet restore src/IpSimple.Platform.sln dotnet build src/IpSimple.Platform.sln
- Make your changes and add tests
- Run tests to ensure everything works:
dotnet test src/IpSimple.Platform.sln
- Run performance benchmarks (if applicable):
cd src/IpSimple.PublicIp.Api.BenchmarkTesting dotnet run -c Release
- Commit your changes:
git add . git commit -m "Add: your feature description"
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request on GitHub
- Follow standard C# coding conventions
- Use meaningful variable and method names
- Add XML documentation for public APIs
- Include unit tests for new functionality
- Ensure high performance (target: 1000+ RPS)
- Keep allocations minimal for hot paths
Before submitting a PR, ensure:
- All unit tests pass:
dotnet test
- Code builds without warnings:
dotnet build
- Performance benchmarks don't regress significantly
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or feedback, please raise an issue here https://github.com/ipsimple/platform/issues