---
title: "Returns the client's IP address."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/ip_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Returns the client's IP address.

`GET` `/ip`

Operation ID: `ip_handler`

Extracts the client IP from request headers. Checks X-Forwarded-For first (for proxied requests), then X-Real-IP as a fallback. # HTTP Method: - `GET` # Responses: - `200 OK`: Returns a JSON object containing the client's origin IP.

## Responses

- `200` - Returns the client's IP address

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /ip:
    get:
      tags:
        - crate::routes::core_routes
      summary: Returns the client's IP address.
      description: >-
        Extracts the client IP from request headers. Checks X-Forwarded-For
        first

        (for proxied requests), then X-Real-IP as a fallback.


        # HTTP Method:

        - `GET`


        # Responses:

        - `200 OK`: Returns a JSON object containing the client's origin IP.
      operationId: ip_handler
      responses:
        "200":
          description: Returns the client's IP address
          content:
            application/json:
              schema: {}
```
