> ## 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地址查询（城市级）

> 获取城市级IP数据

<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>
  IP地址查询API（城市级）支持IPv4/IPv6，位置精确到城市，更新频率为每日更新

  使用该API需向团队申请Key，获得Key后即可调用接口（[联系我们](mailto:wxs@ecylt.com)）
</Info>

<ParamField path="https://api.ecylt.com/v1/ip_get_v2" type="GET">
  基础 API 端口
</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 参数不能为空"
  }
  ```
</ResponseExample>
