---
title: Pagination
slug: cms-12/docs/pagination-skip-and-take
docTags: 
createdAt: 2026-08-10T15:56:04.000Z
---

By default, Optimizely Search & Navigation limits the number of returned documents to 10,000 for a single search, a maximum of 10 pages, with a maximum of 1,000 documents per page by default, which is the behavior of many search engines.

Similar to [LINQ](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/), the Optimizely Search & Navigation .NET API uses the following methods:

- `Skip` –  Bypass the number of search results.
- `Take`  –  Specify how many search results should be returned. You can specify a value of up to 1000 using the `Take` method; `Take(1001)` or `Take(int.MaxValue)` throws an exception. If more than a thousand result items are needed, use [multiple search requests](docId\:qJx8YYthGDWdwKyKZa8ps).

:::hint{type="info"}
**Note**
You cannot combine `Skip` and `Take` to retrieve more than 10,000 hits in a single search. For performance reasons, Optimizely Search & Navigation is not intended for retrieving all content from the database in real-time, with deep pagination.
:::

The following example uses the `Skip` and `Take` methods for pagination.

```csharp
string searchQuery = //From query string or similar
int page = //From query string or similar
int pageSize = 15;

client.Search<BlogPost>()
    .For(searchQuery)
    .Skip((page - 1)*pageSize)
    .Take(pageSize)
    .GetResult();
```

Sometimes, visitors get duplicate hits on pagination because different shards answer the same query. Use the `UsePreference` method to prevent this from happening. By default, the `UsePreference` method does not use the `PrimaryFirst` option, so in rare cases, visitors may still get duplicate hits (although it has better performance). Using the `UsePreference` method with the `PrimaryFirst` option prevents duplicate hits completely, but sometimes, the query can be slower.

The following example shows the `UsePreference` method for pagination.

```csharp
string searchQuery = //From query string or similar
int page = //From query string or similar
int pageSize = 15;

client.Search<BlogPost>()
    .UsePreference()
    .For(searchQuery)
    .Skip((page - 1)*pageSize)
    .Take(pageSize)
    .GetResult();
```
