My IP API
Last updated: 2026-10-15
GET /api/v2/myip
Returns the geolocation of the caller's own IP. The address is taken from the request itself; arbitrary targets are not supported.
Base URL, response format and rate limits are shared across endpoints — see the API documentation.
| Parameter | In | Description |
|---|---|---|
lang |
query | en (default) or zh, controls the language of country / region / city names. |
Example:
curl "https://tcp.lc/api/v2/myip?lang=en"
The response data uses the same fields as IP lookup, with target and addresses empty, and is always sent with Cache-Control: no-store.
Private or reserved addresses return code: -1000 with msg set to api.param.ip.private; data.args.ip carries the address.