> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zec/elastic-ip/describeeips.md).

# DescribeEips

## 1. API Description

This API (DescribeEips) is used to query the information of one or more specified elastic IPs. You can search for elastic IP information based on elastic IP ID, elastic IP name, etc.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name     | Required | Type                                                                         | Description                                                                                                                                                                                                                                                             |
| ------------------ | -------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eipIds             | No       | Array of String                                                              | Filter by the unique ID of the EIP.                                                                                                                                                                                                                                     |
| regionId           | No       | String                                                                       | <p>Filter by the ID of the region that the EIP belongs to.</p><p>It can be obtained by calling <a href="/api-reference/zec/location/describeregions.md">DescribeRegions</a>.</p>                                                                                        |
| name               | No       | String                                                                       | Filter by the display name of the EIP. This field supports fuzzy matching.                                                                                                                                                                                              |
| status             | No       | [EipStatus](/api-reference/zec/datastructure.md#eipstatus)                   | Filter by the status of the EIP.                                                                                                                                                                                                                                        |
| isDefault          | No       | Boolean                                                                      | Filter by the default attribute of the EIP.                                                                                                                                                                                                                             |
| pageSize           | No       | Integer                                                                      | <p>Number of items in the current page result.</p><p>Default value: 20;</p><p>Maximum value: 1000.</p>                                                                                                                                                                  |
| pageNum            | No       | Integer                                                                      | <p>Number of pages returned.</p><p>Default value: 1.</p><p>Default value: 1</p>                                                                                                                                                                                         |
| privateIpAddress   | No       | String                                                                       | Filter by the private IP bound to the EIP.                                                                                                                                                                                                                              |
| ipAddress          | No       | String                                                                       | Filters by the EIP's public IP address.                                                                                                                                                                                                                                 |
| ipAddresses        | No       | Array of String                                                              | Filter by the EIP's public IP address list.                                                                                                                                                                                                                             |
| instanceId         | No       | String                                                                       | <p>Filter by the ID of the instance bound to the EIP.</p><p>This field filters out the EIPs on the network interfaces bound to this instance.</p><p>It can be obtained by calling <a href="/api-reference/zec/instance/describeinstances.md">DescribeInstances</a>.</p> |
| associatedId       | No       | String                                                                       | Filter by the ID of the resource bound to the EIP.                                                                                                                                                                                                                      |
| cidrIds            | No       | Array of String                                                              | <p>Filter by the ID of the CIDR block that the EIP belongs to.</p><p>It can be obtained by calling <a href="/api-reference/zec/cidr-block/describecidrs.md">DescribeCidrs</a>.</p>                                                                                      |
| resourceGroupId    | No       | String                                                                       | Filter by the ID of the resource group that the EIP belongs to.                                                                                                                                                                                                         |
| tagKeys            | No       | Array of String                                                              | <p>Query using tag keys.</p><p>A maximum of 20 tag keys can be used.</p>                                                                                                                                                                                                |
| tags               | No       | Array of [Tag](/api-reference/zec/datastructure.md#tag)                      | <p>Query using tags.</p><p>A maximum of 20 tags can be used.</p>                                                                                                                                                                                                        |
| internetChargeType | No       | [InternetChargeType](/api-reference/zec/datastructure.md#internetchargetype) | Filter by the network billing mode of the EIP.                                                                                                                                                                                                                          |
| prefixLength       | No       | Integer                                                                      | <p>Filter by the mask length of the EIP.</p><p>32 indicates a single IP, and 20–31 indicate a CIDR block.</p><p>Value range: \[20, 32]</p>                                                                                                                              |

## 3. Output Parameters

| Parameter Name | Type                                                            | Description                                                                                                           |
| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                          | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                         | Number of elastic IPs meeting the filtering conditions.                                                               |
| dataSet        | Array of [EipInfo](/api-reference/zec/datastructure.md#eipinfo) | List of elastic IPs.                                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. 1. Query the list of matching IPs by public IP address.**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeEips
<Common Request Params>

Request：
{
  "ipAddress": "128.0.0.1",
  "prefixLength": 32
}


Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
    "dataSet": [
      {
        "eipId": "<eip id>",
        "regionId": "na-east-1",
        "privateIpAddress": "10.0.0.1",
        "publicIpAddresses": [
          "128.0.0.1"
        ],
        "internetChargeType": "ByBandwidth",
        "bandwidth": 1000,
        "rateLimitMode": "LOOSE",
        "cidrId": "<cidr id>",
        "isDefault": true,
        "eipV4Type": "ChinaUnicom",
        "networkLineType": "CUG",
        "createTime": "2022-09-25T16:53:38Z",
        "expiredTime": "2022-10-25T16:53:38Z",
        "name": "EIP-na-east-1-1",
        "status": "BINDED",
        "bindType": "FullNat",
        "flowPackage": null,
        "peerRegionId": null,
        "nicId": "<nic id>",
        "instanceId": "<instance id>",
        "associatedId": "<nic id>",
        "associatedType": "NIC",
        "resourceGroupId": "xx",
        "resourceGroupName": "xx",
        "bandwidthCluster": null,
        "eipGeoRefs": [
          {
            "ip": "128.0.0.1",
            "dbIp": "Washington",
            "ipData": "Washington",
            "ipInfo": "Washington",
            "maxMind": "Washington",
            "ipGeoLocation": "Washington",
            "standard": "Washington",
            "isConsistent": true
          }
        ],
        "blockInfoList": [
          {
            "ip": "128.0.0.1",
            "bps": 100,
            "pps": 200,
            "inCps": 300,
            "outCps": 400
          }
        ],
        "prefixLength": 32,
        "tags": null
      }
    ],
    "totalCount": 1
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
