# List items in a list

> **GET** `https://api.us.nylas.com/v3/lists/{list_id}/items`

Source: https://developer.nylas.com/docs/reference/api/lists/list-list-items/

Returns the items in the specified list.

**Authentication:** NYLAS_API_KEY

## Parameters

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | No | The maximum number of objects to return. See [Pagination](/docs/reference/api/#pagination) for more information. |
| `page_token` | string | No | A token to fetch the next page of results. Use the `next_cursor` value from the previous response. |

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `list_id` | string | Yes | The ID of the list whose items you want to manage. |

## Responses

### 200 - OK

- `request_id` (string) - ID of the request.
- `data` (array)
  - `id` (string) - Globally unique identifier for the list item (UUID).
  - `list_id` (string) - The ID of the list that contains the item.
  - `value` (string) - The item's value, normalized (lowercased and trimmed) on write. The format depends on the parent list's `type`:
a domain, a top-level domain, or an email address.
  - `created_at` (integer) - When the item was added to the list, in seconds using the Unix timestamp format.
- `next_cursor` (string) - A token to use for paginating through results. If present, pass this value as `page_token` in the next request.

### 400 - Bad Request

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 401 - Unauthorized

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 404 - Not Found

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The raw error from the provider, if available
    - `code` (string)
    - `message` (string)

### 429 - Rate Limit

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

## Code samples

### cURL

```bash
curl -X GET "https://api.us.nylas.com/v3/lists/<LIST_ID>/items?limit=50" \
  -H "Authorization: Bearer <NYLAS_API_KEY>"

```

### Node.js SDK

```javascript
import Nylas from "nylas";

const nylas = new Nylas({
  apiKey: "<NYLAS_API_KEY>",
  apiUri: "<NYLAS_API_URI>",
});

async function listItems() {
  try {
    const items = await nylas.lists.listItems({
      listId: "<LIST_ID>",
      queryParams: {
        limit: 10,
      },
    });

    console.log("List items:", items);
  } catch (error) {
    console.error("Error listing items:", error);
  }
}

listItems();

```

### Python SDK

```python
from nylas import Client

nylas = Client(
    "<NYLAS_API_KEY>",
    "<NYLAS_API_URI>",
)

items = nylas.lists.list_items(
    list_id="<LIST_ID>",
    query_params={
        "limit": 50,
    },
)

print(items)

```
