{"openapi":"3.1.0","info":{"title":"Client IP API","version":"1.0.0","description":"Find the real client IP behind proxies, CDNs and load balancers. The client endpoint takes an X-Forwarded-For list (or an RFC 7239 Forwarded header) together with a count of proxies you trust, and returns the actual client address — stripping the trusted proxies from the right-hand side so that a spoofed left-most value cannot fool you — along with the full ordered hop chain, the left-most and right-most entries and the address family. The parse endpoint decomposes a Forwarded header into its for/by/host/proto hops, or an X-Forwarded-For header into its ordered list of addresses, stripping ports and IPv6 brackets so you get clean IPs. Getting this right matters for security: trusting the wrong entry lets clients spoof their IP, so the trusted-proxy model returns the first address you did not put there yourself. Everything is computed locally and deterministically, so it is instant and private. Ideal for reverse proxies and API gateways, rate limiting and abuse prevention, audit logging and analytics, geo and fraud checks, and any backend sitting behind a load balancer. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This parses forwarding headers to find the client IP; to geolocate that IP use an IP-geolocation API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/clientip-api","description":"oanor gateway"}],"tags":[{"name":"Client IP"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/client":{"get":{"operationId":"get_v1_client","tags":["Client IP"],"summary":"Find the client IP","description":"","parameters":[{"name":"xff","in":"query","required":false,"description":"The X-Forwarded-For header value","schema":{"type":"string"},"example":"203.0.113.5, 70.41.3.18, 150.172.238.178"},{"name":"forwarded","in":"query","required":false,"description":"An RFC 7239 Forwarded header (alternative to xff)","schema":{"type":"string"}},{"name":"trusted","in":"query","required":false,"description":"Number of trusted proxies to skip from the right (default 0)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"hops":3,"kind":"ipv4","chain":["203.0.113.5","70.41.3.18","150.172.238.178"],"leftmost":"203.0.113.5","client_ip":"70.41.3.18","rightmost":"150.172.238.178","trusted_proxies":1},"meta":{"timestamp":"2026-06-03T09:25:01.602Z","request_id":"9525950b-0d71-453d-9cf5-f0ceb80a3f18"},"status":"ok","message":"Find the client IP","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/parse":{"get":{"operationId":"get_v1_parse","tags":["Client IP"],"summary":"Parse a forwarding header","description":"","parameters":[{"name":"header","in":"query","required":true,"description":"A Forwarded or X-Forwarded-For header value","schema":{"type":"string"},"example":"203.0.113.5, 70.41.3.18, 150.172.238.178"},{"name":"type","in":"query","required":false,"description":"auto (default), forwarded or xff","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"type":"x-forwarded-for","count":3,"addresses":[{"ip":"203.0.113.5","raw":"203.0.113.5","kind":"ipv4"},{"ip":"70.41.3.18","raw":"70.41.3.18","kind":"ipv4"},{"ip":"150.172.238.178","raw":"150.172.238.178","kind":"ipv4"}]},"meta":{"timestamp":"2026-06-03T09:25:01.688Z","request_id":"7aed550f-ea98-4fe1-9bdf-748114f32428"},"status":"ok","message":"Parse a forwarding header","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Client IP API","notes":"X-Forwarded-For is ordered client, proxy1, proxy2 (left to right); the right-most entry is the closest proxy. Set trusted to the number of proxies in front of your app so the returned IP is the first untrusted one. Ports and IPv6 [brackets] are stripped. This parses headers — it does not geolocate the IP. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/client","params":{"xff":"the X-Forwarded-For header value","trusted":"number of trusted proxies to skip from the right (default 0)","forwarded":"an RFC 7239 Forwarded header (alternative to xff)"},"returns":"the client IP and the full chain"},{"path":"/v1/parse","params":{"type":"auto (default), forwarded or xff","header":"a Forwarded or X-Forwarded-For header value (required)"},"returns":"the parsed hops or address list"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Find the real client IP behind proxies and load balancers. The client endpoint takes an X-Forwarded-For list (or an RFC 7239 Forwarded header) and a count of trusted proxies, and returns the actual client address — stripping the proxies you trust from the right-hand side so a spoofed left-most value can't fool you — along with the full hop chain. The parse endpoint decomposes a Forwarded header into its for/by/host/proto hops, or an X-Forwarded-For header into its ordered list of addresses, stripping ports and IPv6 brackets. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:01.795Z","request_id":"22bdbbe0-c14a-4027-a3d6-f016c2a8b951"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":3135,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":465,"monthly_call_quota":12650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2455,"monthly_call_quota":177500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6255,"monthly_call_quota":930000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/clientip-api"}