# Datapoints.QueryPage

```go
func (datapointClient) QueryPage(
    ctx context.Context,
    datasetID uuid.UUID,
    options ...datasets.QueryOption,
) (*datasets.DatapointPage, error)
```

Query a single page of datapoints from one or more collections of the same dataset.

Use `QueryPage` when you need manual pagination. Use [`Datapoints.Query`](/docs/api-reference/go/datasets/Datapoints.Query) for automatic lazy pagination.

## Parameters

**datasetID**

`uuid.UUID`

required: true

The ID of the dataset to query.

**options**

`[]datasets.QueryOption`

Options for querying datapoints.

## Options

**datasets.WithTemporalExtent(temporalExtent query.TemporalExtent)**

required: true

Specify the time or datapoint ID interval to query.

**datasets.WithSpatialExtent(spatialExtent orb.Geometry)**

Specify the geographical extent to query.

**datasets.WithSpatialExtentFilter(spatialExtent query.SpatialExtent)**

Specify a geographical extent with an explicit spatial filter mode and coordinate system.

**datasets.WithCollections(collections ...\*datasets.Collection)**

Restrict the query to specific dataset collections by collection object.

**datasets.WithCollectionIDs(collectionIDs ...uuid.UUID)**

Restrict the query to specific dataset collections by collection ID.

**datasets.WithFilters(filters ...query.Expression)**

Filter by fields marked queryable in the dataset schema. Multiple expressions are combined with each other and with
temporal, spatial, and collection filters using logical AND.

**datasets.WithSkipData()**

default: false

Skip datapoint data and return only required and generated fields.

**datasets.WithCursor(cursor \*datasets.Cursor)**

Start the query after the cursor returned by a previous page.

**datasets.WithLimit(limit int64)**

Limit the number of datapoints returned in this page.

## Returns

A `DatapointPage` with raw protobuf datapoints in `Datapoints` and an optional `NextCursor` for the next page.

```go title="Go"
page, err := client.Datapoints.QueryPage(ctx,
    dataset.ID,
    datasets.WithTemporalExtent(queryInterval),
    datasets.WithCollectionIDs(collection.ID),
    datasets.WithFilters(query.Field("quality").GreaterThanOrEqual(80)),
    datasets.WithLimit(100),
)
if err != nil {
    return err
}

if page.NextCursor != nil {
    nextPage, err := client.Datapoints.QueryPage(ctx,
        dataset.ID,
        datasets.WithTemporalExtent(queryInterval),
        datasets.WithCollectionIDs(collection.ID),
        datasets.WithFilters(query.Field("quality").GreaterThanOrEqual(80)),
        datasets.WithCursor(page.NextCursor),
        datasets.WithLimit(100),
    )
    _ = nextPage
    _ = err
}
```

See [Filter by custom fields](/docs/datasets/query/filter-by-fields) for comparisons, boolean expressions, and null checks.
