Skip to content

API guides/IP, DNS, and HTTP

Free

What is my public IP API

Return the caller’s public IPv4 or IPv6. ipify (JSON) and Cloudflare trace. Both free, no key.

Check official docs

2 providers · 3 min · Limits change — verify before you ship

IP, DNS, and HTTP

What this is for

Useful in diagnostics and “what IP will this server egress as?” checks. This is not geolocation — chain it with an IP-to-details API if you need city or ASN.

ProviderPricingKeyHTTPSCORS
ipifyFreeNo keyYesUsually yes
Cloudflare traceFreeNo keyYesVerify

ipify

Free

GET https://api.ipify.org?format=json

Official docs

HTTPS

Yes

API key

No key

CORS

Usually yes

Use

Free tier

Limits. No published hard cap. Still cache and avoid polling loops.

Commercial. Documented as free to use. Confirm on ipify.org.

Note. Use api64.ipify.org if you care about IPv6.

curl -sS "https://api.ipify.org?format=json"

Cloudflare trace

Free

GET https://www.cloudflare.com/cdn-cgi/trace

Official docs

HTTPS

Yes

API key

No key

CORS

Verify

Use

Free tier

Limits. Operational endpoint, not a billed API. Do not build a product that scrapes it in a hot path.

Commercial. Fine for occasional diagnostics. Not a geolocation product.

Note. Response is text/plain key=value lines, not JSON. loc is a country hint, not a full geo record.

curl -sS "https://www.cloudflare.com/cdn-cgi/trace"

PureDevKit does not host or proxy these APIs. Pricing, rate limits, CORS, authentication, and JSON shapes can change without notice. Always confirm the current rules on the provider’s official documentation before you ship.