> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.botbye.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.botbye.com/_mcp/server.

# items

GET https://api.botbye.com/api/v1/{account_id}/ip-lists/{ip_list_id}/items

Page through the addresses of a list in the order they were added.

An address past its `expiresAt` no longer matches rules and is removed from the list within minutes.

## Errors

| Status | `code` | When |
| --- | --- | --- |
| 404 | `protection_ip_list.ip_list_not_found` | The account has no list with this id |

> **Accepted permissions**
> `Account → IP lists → Lists`
>
> **Token scope**
> `Account IP Lists View`

Reference: https://api-docs.botbye.com/bot-bye-api/protection/ip-lists/items

## Authentication

- `X-Api-Key` header (required) — Personal access token. Create it in your BotBye account under **Profile → Personal Access Tokens**, tick the scopes the endpoints you call require (see each endpoint's **Token scope**), and send the token in the `X-Api-Key` request header exactly as the console shows it (it is already Base64-encoded; a token saved earlier in the UUID form must be Base64-encoded first). A token works only for the account it was created in.

## Request

### Path parameters

- `account_id` (string, required)
- `ip_list_id` (string, required)

### Query parameters

- `search` (string, optional) — Keep the addresses that contain this text, ignoring case
- `cursor` (string, optional) — Cursor-based pagination JSON: \{"first": N, "after": "..."}; at most 1000 per page, 20 by default
- `total` (boolean, optional) — `true` to count the matching addresses in `pageInfo.total`

## Response

### 200

success

- `edges` (list of ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaEdgesItems, optional)
- `pageInfo` (ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaPageInfo, optional)

## Types

### ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaEdgesItems

- `cursor` (string, optional)
- `node` (ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaEdgesItemsNode, optional)

### ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaPageInfo

- `hasPreviousPage` (boolean, optional)
- `hasNextPage` (boolean, optional)
- `startCursor` (string, optional, nullable)
- `endCursor` (string, optional, nullable)
- `total` (integer, optional)

### ApiV1AccountIdIpListsIpListIdItemsGetResponsesContentApplicationJsonSchemaEdgesItemsNode

- `ip` (string, optional)
- `comment` (string, optional, nullable)
- `expiresAt` (string, optional, nullable)
- `country` (string, optional, nullable) — ISO 3166-1 alpha-3 country of the address, when known

## Examples

**Response**

```json
{
  "edges": [
    {
      "cursor": "1",
      "node": {
        "ip": "203.0.113.7",
        "comment": "gateway",
        "expiresAt": null,
        "country": null
      }
    },
    {
      "cursor": "2",
      "node": {
        "ip": "198.51.100.9",
        "comment": null,
        "expiresAt": "1794650675478",
        "country": null
      }
    }
  ],
  "pageInfo": {
    "hasPreviousPage": false,
    "hasNextPage": false,
    "startCursor": null,
    "endCursor": null,
    "total": 2
  }
}
```

**SDK Code**

```python IP Lists_items_example
import requests

url = "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items"

querystring = {"search":"198.51","cursor":"{\"first\": 100}","total":"true"}

headers = {"X-Api-Key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript IP Lists_items_example
const url = 'https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true';
const options = {method: 'GET', headers: {'X-Api-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go IP Lists_items_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby IP Lists_items_example
require 'uri'
require 'net/http'

url = URI("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java IP Lists_items_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true")
  .header("X-Api-Key", "<apiKey>")
  .asString();
```

```php IP Lists_items_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true', [
  'headers' => [
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp IP Lists_items_example
using RestSharp;

var client = new RestClient("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift IP Lists_items_example
import Foundation

let headers = ["X-Api-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id/items?search=198.51&cursor=%7B%22first%22%3A+100%7D&total=true")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```