# Class PagingRequest | AnthropicClient
Represents a request to page through a collection of items.

# Class PagingRequest

Namespace
  AnthropicClient.Models

Assembly
  AnthropicClient.dll

Represents a request to page through a collection of items.

    public class PagingRequest

Inheritance
  object
  PagingRequest

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### PagingRequest(string, string, int)

Initializes a new instance of the PagingRequest class.

    public PagingRequest(string beforeId = "", string afterId = "", int limit = 20)

#### Parameters

`beforeId` string

  The ID of the item before which to start the page.

`afterId` string

  The ID of the item after which to start the page.

`limit` int

  The maximum number of items to return in the page.

#### Exceptions

ArgumentException

  Thrown when both `beforeId` and `afterId` are specified.

ArgumentOutOfRangeException

  Thrown when `limit` is less than 1 or greater than 1000.

## Properties

### AfterId

The ID of the item after which to start the page.

    [JsonPropertyName("after_id")]
    public string AfterId { get; init; }

#### Property Value

string

### BeforeId

The ID of the item before which to start the page.

    [JsonPropertyName("before_id")]
    public string BeforeId { get; init; }

#### Property Value

string

### Limit

The maximum number of items to return in the page.

    public int Limit { get; init; }

#### Property Value

int

## Methods

### ToQueryParameters()

Converts the PagingRequest to a query string.

    public string ToQueryParameters()

#### Returns

string

  The query string representation of the PagingRequest.