Skip to content

AiratTop/ip.api.airat.top

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip.api.airat.top

ip

Simple Cloudflare Worker API that returns your public IP address in multiple formats.

Live endpoints:

Status page: https://status.airat.top

API

GET /

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

GET /json

JSON alias for / (same payload).

curl 'https://ip.api.airat.top/json'

Test in browser: https://ip.api.airat.top/json

GET /text

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

GET /yaml

Returns the same payload as YAML.

curl 'https://ip.api.airat.top/yaml'

Test in browser: https://ip.api.airat.top/yaml

GET /xml

Returns the same payload as XML.

curl 'https://ip.api.airat.top/xml'

Test in browser: https://ip.api.airat.top/xml

GET /health

Health check endpoint.

curl 'https://ip.api.airat.top/health'

Response:

{
  "status": "ok"
}

Test in browser: https://ip.api.airat.top/health

CORS

CORS is enabled for all origins (*).

Privacy

No analytics or request logs are collected by this project.

Project structure

  • worker.js - Cloudflare Worker script.
  • wrangler.toml - Wrangler configuration.

Deployment

Deploy with Wrangler:

npx wrangler deploy

If 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.

License

This project is licensed under the MIT License - see LICENSE.


Author

AiratTop

About

Public IP API on Cloudflare Workers. Returns client IP and metadata in JSON (/, /json), plain text (/text), YAML (/yaml), XML (/xml), plus /health and robots.txt.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors