api.xuchunyang.me · httpbin-style test API

JSON (2-space indented) · CORS * · no auth · ?seed= makes random endpoints deterministic · bad params → 400 JSON · rate limit 120 req / 60 s per IP → 429 + Retry-After

Spec: /openapi.json (OpenAPI 3.1, import into Postman/Insomnia)

curl -s https://api.xuchunyang.me/ip
curl -s -X POST https://api.xuchunyang.me/post -H 'content-type: application/json' -d '{"a":1}'
HTTP
ANY/anything[/*]Echo method, url, args, headers, body, json, form
GET/getEcho GET request
POST/postEcho POST body (also PUT/PATCH/DELETE at their paths)
GET/headersRequest headers
GET/ipIP, city, region, loc, timezone, ASN, ISP, colo, TLS
GET/status/:codeRespond with status 100–599 (1xx → 400)
GET/delay/:sWait 0–10 s, then echo
GET/redirect/:nn×302 (≤10), ends at /get
ANY/mockCustom response: status, body (≤64 KB), content_type, header=Name:%20value (repeatable), delay 0–10 s; or POST JSON {status,headers,body,delay}
Data
GET/time?tz=Current time, IANA tz
GET/uuid?n=1–100 UUIDv4
GET/color?format=json|svgRandom hex/rgb/hsl or SVG swatch
GET/logo?text=&size=SVG initials logo, size 16–1024
GET/quote?lang=en|zhRandom quote with author
GET/bytes/:nn random bytes (≤1 MiB), octet-stream
Images (302)
GET/image?w=&h=Picsum, 1–4096 px
GET/cat?w=&h=Cataas
GET/dog?format=jsonDog CEO; format=json returns URL
Geo
GET/geo/meCloudflare location of the caller
GET/geo/countries250 countries (en/zh, iso2/3, flag, capital, currency, calling code)
GET/geo/country/:codeLookup by ISO2/ISO3
GET/geo/randomRandom country
Files
GET/files/sample.{json,csv,txt,svg,png}Static sample files
Meta
GET/openapi.jsonOpenAPI 3.1 spec

Cloudflare Workers · http & https