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

# Lists and paging

> Every list answers one page at a time.

```json 200 wrap theme={"dark"}
{
  "results": [
    { "title": "How do I get started?" },
    { "title": "Where can I find pricing?" }
  ],
  "pages": 4,
  "currentPage": 1
}
```

A content type's list answers one page of documents, and where you are in the list.

**results** `object[]`

This page's documents.

**pages** `integer`

How many pages the list has.

**currentPage** `integer`

The page this is, from 1.

## Asking for a page

**page** `integer` (default: 1)

The page to answer, from 1.

**perPage** `integer`

Documents per page. Each content type has its own default. There is no upper limit, but a large
page of a big list is slow: page through it instead.

```bash theme={"dark"}
curl 'https://acme.example/api/v1/faq-item?page=2&perPage=50'
```

> [!NOTE]
>
> A few lists page their own way, and say so in the API reference: the media lists (`limit`, `total`),
> conversion events (a `since` cursor) and the request log.

## Walking a whole list

Each list method has an `…All()` twin in the SDKs: it fetches a page at a time as you go and stops
after the last, however the list pages. No paging by hand.

```php Laravel theme={"dark"}
Attract::faqItems()->listFaqItemsAll(perPage: 50)
    ->each(fn ($item) => logger()->info($item->title));
```

```ts TypeScript theme={"dark"}
for await (const item of site.faqItems().listFaqItemsAll({ perPage: 50 })) {
  console.log(item.title);
}
```

> [!TIP]
>
> Only after ids? Each list method also has a `…Pick()` twin that walks every page for just the fields
> you name: [Find an id](https://docs.fetchski-attract.com/find-an-id.md).

## Searching and filtering

> [card] search
>
> Matches documents by their text.

> [card] slug
>
> Finds one document by its URL name.

Every other filter a list takes is on its page in the API reference.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.