Skip to content
YAS.SH
Network & DNS🌐 YAS server-sideAPI availablebeginner

My IP (plain)

Returns just your public IP address as plain text — curl-friendly.

Processed by YAS · not stored
Ready to runInstant execution
All tools →
Your public IP — plain text, curl-friendly
100% free / open-source — no API key. Client IP is resolved securely: proxy headers are only trusted when behind a configured reverse proxy (TRUST_PROXY).
curl (plain)
curl -s https://yas.sh/ip
curl (JSON)
curl -s https://yas.sh/ip?format=json
# {"ip":"1.2.3.4"}

curl -s https://yas.sh/api/v1/tools/ip
# 1.2.3.4

curl -X POST https://yas.sh/api/v1/tools/what-is-my-ip \
  -H "Content-Type: application/json" -d '{}'
# full geo + VPN/Tor
Why this is free & open-source
  • No paid feed — uses ipapi.co (1k/day) → ipwho.is → ip-api.com (45/min) fallback chain.
  • Tor detection via public bulk exit list https://check.torproject.org/torbulkexitlist (cached 1h).
  • VPN/proxy/hosting from free security flags (ipapi.co vpn/proxy/tor, ipwho.is security.*, ip-api.com proxy/hosting).
  • Client-IP headers (X-Real-IP / XFF / CF-Connecting-IP) are trusted only behind a configured proxy (TRUST_PROXY) — no spoofable echoes.
  • Self-hostable: no secret, no DB write, 15-min memory cache.

What does this tool do?

Returns just your public IP address as plain text — curl-friendly.

Why would I use it?

  • You want a quick, scriptable way to get your public IP.
  • You are writing a shell script that needs the address.
  • You prefer minimal output.

Real-life example

Input
curl https://yas.sh/ip
Output
203.0.113.7

Nothing but the address, ideal for scripts.

Input → Process → Output → Next

Input
GET the endpoint (or open the page).
Process
YAS returns the request's source IP.
Output
Plain-text IP.
Next action
Pipe it into scripts or compare against expected values.

Common mistakes

  • Using it for IPv6 when your ISP gives IPv4 (returns what you connect with).
  • Expecting JSON (use what-is-my-ip for details).

What the result means

The plain text is your public IP.

Privacy & security

Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.

API

Endpoint
POST https://yas.sh/api/v1/tools/ip
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/ip" \
  -H "Content-Type: application/json" \
  -d '{}'
JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/ip", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const data = await res.json();
Python
import requests

r = requests.post("https://yas.sh/api/v1/tools/ip", json={})
data = r.json()
FieldTypeRequiredDescription
ipstringNoOptional specific IP to look up (defaults to your own).
Success response
{ "slug": "ip", "result": "8.8.8.8" }  // GET returns bare text: 8.8.8.8

Your public IP address and nothing else — also available as plain text via GET.

Error responses
  • 400 VALIDATION_ERROR — invalid input or unsupported option.
  • 413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.
  • 429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).
Limits
  • Maximum input: 64 KB per request.
  • Rate limit: 60 requests/min per IP address.
  • Authenticated accounts benefit from higher tier quotas.
Ask YAS AI
🍪 Cookies & privacy. Essential cookies keep you signed in and remember language and theme. Google AdSense and reCAPTCHA are Google technologies: AdSense runs only after Accept All; reCAPTCHA loads on sign-in and contact forms. See how Google uses data: https://policies.google.com/technologies/partner-sites cookie policy · privacy policy.
Settings