Simple Cloudflare Worker API that returns your public IP address in multiple formats.
Live endpoints:
Status page: https://status.airat.top
Default endpoint. Returns IP and request metadata as JSON.
curl 'https://ip.api.airat.top/'Example response:
{
"ip": "203.0.113.10",
"network": {
"asn": 13335,
"asOrganization": "Cloudflare, Inc.",
"colo": "SJC"
},
"location": {
"city": "San Jose",
"region": "California",
"regionCode": "CA",
"postalCode": "95141",
"country": "US",
"continent": "NA",
"latitude": 37.3417,
"longitude": -121.9753,
"timezone": "America/Los_Angeles"
},
"connection": {
"httpProtocol": "HTTP/2",
"tlsVersion": "TLSv1.3",
"tlsCipher": "AEAD-AES128-GCM-SHA256",
"clientTcpRtt": 12
},
"request": {
"method": "GET",
"userAgent": "curl/8.8.0",
"acceptLanguage": "en-US"
},
"service": "ip.api.airat.top",
"generatedAt": "2026-03-21T15:00:00.000Z"
}Test in browser: https://ip.api.airat.top
JSON alias for / (same payload).
curl 'https://ip.api.airat.top/json'Test in browser: https://ip.api.airat.top/json
Returns only the IP address as plain text.
curl 'https://ip.api.airat.top/text'Response:
203.0.113.10
Test in browser: https://ip.api.airat.top/text
Returns the same payload as YAML.
curl 'https://ip.api.airat.top/yaml'Test in browser: https://ip.api.airat.top/yaml
Returns the same payload as XML.
curl 'https://ip.api.airat.top/xml'Test in browser: https://ip.api.airat.top/xml
Health check endpoint.
curl 'https://ip.api.airat.top/health'Response:
{
"status": "ok"
}Test in browser: https://ip.api.airat.top/health
CORS is enabled for all origins (*).
No analytics or request logs are collected by this project.
worker.js- Cloudflare Worker script.wrangler.toml- Wrangler configuration.
Deploy with Wrangler:
npx wrangler deployIf you use Cloudflare Workers Builds (GitHub integration), keep root directory as / and deploy command as npx wrangler deploy.
For custom domain binding, configure it in Workers & Pages -> Domains & Routes.
This project is licensed under the MIT License - see LICENSE.
AiratTop
- Website: airat.top
- GitHub: @AiratTop
- Email: mail@airat.top
- Repository: ip.api.airat.top