API & CLI
Everything ipc.moe knows about an IP, one request away. No sign-up, no API key — plain text in your terminal, JSON for your code, SVG cards for your pages.
curl ipc.moe
203.0.113.42
Works with curl, wget, HTTPie, PowerShell and any HTTP library. Requests that don't ask for HTML get plain text.
Quick start
Copy, paste, done.
- Your IP only
curl ipc.moe - Full report, pretty text
curl ipc.moe/r - Full report as JSON
curl ipc.moe/json - Look up any IP
curl ipc.moe/1.1.1.1
Command line
Made for the terminal
Any client whose Accept header doesn't include text/html is treated as a command-line client and gets plain text, with ANSI colors for curl-like tools. Browsers get the same data formats at these exact paths.
Paths
A target is an IPv4 or IPv6 address, an AS number like AS13335, or a domain (resolved to its first A record).
| Path | Returns | Example |
|---|---|---|
/ /ip | Your public IP address, followed by a newline. | curl ipc.moe |
/{format} | Your full report in that format. | curl ipc.moe/json |
/{field} | A single value from your report, followed by a newline. | curl ipc.moe/country |
/{target} | The pretty text report for that IP, AS number or domain. | curl ipc.moe/1.1.1.1 |
/{target}/{format|field} | A format or a single field, for that target. | curl ipc.moe/github.com/score |
Formats
Use them as /{format} or /{target}/{format}.
| Format | Output |
|---|---|
json | The full report as JSON (same shape as the JSON API). |
yaml or yml | The full report as YAML. |
xml | The full report as XML. |
csv | A header row and one data row. |
tsv | Same as CSV, tab-separated. |
toml | The full report as TOML. |
txt or text | Plain-text report without colors. |
report or r | The pretty text report with boxes and colors. |
short | One line: IP, location, network, score. |
md | A Markdown report, ready to paste into an issue. |
env | KEY=value lines for shell scripts. |
help | Every path and parameter, right in your terminal. |
Fields
Plain values, ideal for scripts and prompts.
| Field | Value | Sample |
|---|---|---|
country | Country name (localized) | Japan |
cc | ISO 3166-1 country code | JP |
city | City | Tokyo |
region | Region or state | Tokyo |
asn | Autonomous system number | AS4713 |
org | Organization | NTT Communications |
isp | Internet service provider | OCN |
tz | IANA time zone | Asia/Tokyo |
loc | Latitude,longitude | 35.6895,139.6917 |
score | Health score, 0–100 | 92 |
grade | Grade, A+ to D | A+ |
type | IP type | residential |
native | native, broadcast or unknown | native |
ptr | Reverse DNS name | p1234-ipoe.ocn.ne.jp |
Query parameters
Work on every command-line response.
| Parameter | Values | Default | Description |
|---|---|---|---|
lang | zh-Hans · zh-Hant · en · ja | Accept-Language | Language of the report and labels. |
color | auto · always · never | auto | ANSI colors. auto turns them on for curl, wget, HTTPie and xh. |
mask | 0 · 1 | 0 | 1 hides the last two IPv4 octets (or the last 80 bits of IPv6) and the city. |
fields | ip,geo,score… | — | Comma-separated list of fields to keep. JSON, YAML and CSV only. |
width | <n> | 72 | Width of the text report, in columns. |
ascii | 0 · 1 | 0 | 1 drops box-drawing characters and emoji, for old terminals and logs. |
Examples
Quote URLs that contain ? or & so your shell leaves them alone.
Pretty report in Japanese, 100 columns wide
curl "ipc.moe/r?lang=ja&width=100"Just your ASN
curl ipc.moe/asnAnother IP as JSON, only the fields you need
curl "ipc.moe/8.8.8.8/json?fields=ip,geo,score"An autonomous system
curl ipc.moe/AS13335A domain, as a one-line summary
curl ipc.moe/github.com/shortSafe for screenshots: masked, no colors, plain ASCII
curl "ipc.moe/r?mask=1&color=never&ascii=1"With wget
wget -qO- ipc.moeWith PowerShell
irm ipc.moe/jsonJSON API
A JSON API for everything
The same data that powers this site. Send lang to get human-readable text in your language; country names, verdicts and reasons come back localized.
Endpoints
Base URL https://ipc.moe/api/v1
| Method | Path | Purpose | Limit |
|---|---|---|---|
| GET | /api/v1/me | Your IP, IP version and country code. Instant: no external lookups. | — |
| GET | /api/v1/report/{target}?lang= | The full report for an IP, or self for yours. Answers within about 6 s; meta.partial is true when a source timed out. | 30/min |
| GET | /api/v1/geo?ips=a,b,c&lang= | Batch lookup of up to 50 IPs from local databases. Returns a GeoBrief per IP. | 60/min |
| POST | /api/v1/ai/assess?lang= | Per-service AI scores from live browser signals (exit IPs, time zone, languages, WebRTC and DNS resolvers). | 30/min |
| GET | /api/v1/catalog?lang= | AI services, split-test targets, STUN servers and connectivity targets used by the browser tests. | — |
| GET | /api/v1/status?lang= | Live status summary of major online services. | — |
| GET | /api/v1/status/{slug}?lang= | Status, components and recent incidents of one service. | — |
| POST | /api/v1/share | Create a share snapshot (≤ 16 KB). Returns its id, url and a delete_token. | 10/min |
| GET | /api/v1/share/{id} | Read a share snapshot. 404 once it has expired (after 30 days). | — |
| DELETE | /api/v1/share/{id} | Delete a snapshot you created. Send its delete token in the X-Delete-Token header. | — |
| GET | /api/v1/dnsleak/new | Start a DNS leak test. Returns available: false until our own DNS servers are live. | 20/min |
| GET | /api/v1/dnsleak/{id} | Resolvers seen for a DNS leak test, with EDNS client subnet when present. | 20/min |
| GET | /api/v1/stats/public | Public totals: page views, visitors, reports served, since when. | — |
| POST | /api/v1/events | Anonymous page-view batches from this website.Used by this site | 120/min |
| GET | /api/v1/admin/stats?days=90 | Daily traffic statistics for the site owner.Admin only | — |
Examples
Pick an endpoint and a language. Every snippet is complete and runs as is.
GET /api/v1/report/{target}?lang=
The full report for an IP, or self for yours. Answers within about 6 s; meta.partial is true when a source timed out.
curl -s "https://ipc.moe/api/v1/report/1.1.1.1?lang=en"Report
Top-level fields of /api/v1/report. How the score works →
| Field | Type | Description |
|---|---|---|
query | string | What you asked for; self resolves to your IP. |
ip | string | The IP address described. |
version | 4 | 6 | IP version. |
self | boolean | true when the report is about the caller's own IP. |
generated_at | string | When the report was built (ISO 8601). |
geo | Geo | Country, region, city, coordinates, time zone and accuracy. |
network | Network | ASN, AS name, organization, ISP, prefix, RIR, RPKI, PTR and abuse contact. |
type | IPType | Residential, mobile, business, education, government, hosting, CDN or unknown, with each source's vote. |
native | Native | Native or broadcast IP: registered country versus geolocated country. |
flags | Record<FlagKey, Flag> | Proxy, VPN, Tor, relay, hosting, crawler, abuser, mobile, anycast and bogon, with sources. hint means only one source said so. |
risk | Risk | Blocklist matches, DNSBL results, abuse and proxy scores, GreyNoise, and risky neighbors in the same /24. |
exposure | Exposure | null | Open ports, tags, known CVEs and hostnames from Shodan InternetDB. |
sources | GeoSource[] | Every geolocation source side by side. |
cn_sources | CNSource[] | Chinese-language databases such as ip2region. |
score | HealthScore | Health score 0–100, grade, type cap and every item that changed it. |
ai | AIIPScore[] | IP-only availability and risk for each AI service. |
suitability | Suitability[] | How well the IP suits common uses. |
summary | string | One-line verdict, localized. |
tags | Tag[] | Localized labels shown under the IP. |
meta | Meta | elapsed_ms, partial, sources_ok / sources_total, model and cached. |
GeoBrief
One entry per IP in /api/v1/geo.
| Field | Type | Description |
|---|---|---|
ip | string | The IP address. |
country_code | string | ISO 3166-1 alpha-2. |
country | string | Country name, localized. |
region | string | Region or state. |
city | string | City. |
asn | number | null | AS number, if known. |
org | string | Network organization. |
text | string | Ready-made one-line description, localized. |
Errors
Every error has the same shape, with a 4xx or 5xx status. The message follows lang.
{
"error": {
"code": "invalid_target",
"message": "…"
}
}| Code | HTTP | Meaning |
|---|---|---|
bad_request | 400 | Malformed request or body. |
invalid_target | 400 | Not a valid IP address. |
private_target | 400 | Private, reserved or bogon address. |
too_many_ips | 400 | More than 50 IPs in one geo request. |
unauthorized | 401 | Missing or wrong credentials. |
not_found | 404 | Unknown path, or the item doesn't exist or has expired. |
too_large | 413 | Request body too large. |
rate_limited | 429 | Too many requests. Wait for Retry-After seconds. |
internal | 500 | Something broke on our side. |
unavailable | 503 | Temporarily unavailable. Try again shortly. |
Rate limits
Per client IP, as a token bucket that allows short bursts. Over the limit you get 429 with a Retry-After header, in seconds. Endpoints not listed have no dedicated limit.
- 30per minReports
- 60per minGeo batches
- 30per minAI assessments
- 10per minNew shares
- 20per minDNS leak tests
- 60per minCommand-line reports
- 120per minCard images
HTTP/1.1 429 Too Many Requests
Retry-After: 2
Content-Type: application/json; charset=utf-8
{"error":{"code":"rate_limited","message":"…"}}Cards
Embeddable IP cards
A self-contained SVG that works anywhere an image does — READMEs, forums, blogs, status pages. Use me for the viewer's own IP, or any IP address.
/card/1.1.1.1.svg?style=glass&size=standardParameters
GET /card/{target}.svg — target is me or an IP address.
| Parameter | Values | Default | Description |
|---|---|---|---|
style | glass · minimal · terminal · neon · paper · anime | glass | Visual style. anime adds an AI-chan illustration. |
theme | auto · light · dark | auto | auto follows the viewer's light or dark mode inside the SVG. |
size | badge · compact · standard · wide · square · banner · social · w/h | standard | Preset size, or set w (200–1600) and h (60–1600) yourself:badge 360×72 · compact 420×140 · standard 560×240 · wide 760×240 · square 420×420 · banner 1200×320 · social 1200×630 |
fields | ip,flag,location,isp,asn,score,type,native,ai,risk,time | — | Comma-separated list of what to show. Each size has sensible defaults. |
char | claude · gpt · gemini · deepseek · … · none | none | AI-chan character id, or none. The anime style defaults to claude. |
accent | 5856d6 | — | Accent color, hex without #. Each style has its own. |
radius | 0–48 | 24 | Corner radius in pixels. |
mask | 0 · 1 · 2 | 0 | 0 shows everything, 1 hides part of the IP and the city, 2 hides the IP and location. |
lang | zh-Hans · zh-Hant · en · ja | Accept-Language | Language of the labels. |
title | ≤ 40 | — | Custom title, up to 40 characters. |
anim | 0 · 1 | 1 | 1 keeps the subtle CSS animations inside the SVG, 0 turns them off. |
Returns image/svg+xml. Character art is embedded, so cards work in <img> tags with no external requests.
Try it
Send a live request
Run any GET request under /api/v1/ right from this page. It's your browser talking to the API, so it counts against your own rate limit.
Press Return to run. Edit the path to try other endpoints.