> ## Documentation Index
> Fetch the complete documentation index at: https://docs.api.ecylt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IP address lookup (city-level)

> Get city-level IP data

<Warning>
  In accordance with [U.S. CFR Title 28 Part 202](https://www.ecfr.gov/current/title-28/chapter-I/part-202), API access will be discontinued effective July 6, 2025, 02:00 UTC.
</Warning>

<Info>
  The IP address lookup API (city-level) supports IPv4/IPv6, with city-level location precision and daily updates.

  Using this API requires an API Key from the team. Once you obtain a Key, you can call the interface ([contact us](mailto:wxs@ecylt.com)).
</Info>

<ParamField path="https://api.ecylt.com/v1/ip_get_v2" type="GET">
  Base API endpoint
</ParamField>

<ParamField header="API-Key-V2" type="Header String" required>
  API Key
</ParamField>

<ParamField query="ip" type="string" required>
  ip address(IPv4 / IPv6)
</ParamField>

<ResponseExample>
  ```json 200: OK normal response theme={null}
  {
      "country": "",
      "country_code": "",
      "region": "",
      "city": "",
      "latitude": ,
      "longitude": ,
      "location": "",
      "asn": ,
      "organization": "",
      "api_by": "二次元API https://www.ecylt.top"
  }
  ```

  ```json 400: Bad Request wrong response theme={null}
  {
    "error": "IP parameter cannot be empty"
  }
  ```
</ResponseExample>
