---
title: "Datapoints.QueryPage"
description: "Query a single page of datapoints from one or more collections of the same dataset."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# Datapoints.QueryPage

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```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**

type: uuid.UUID

required: true

The ID of the dataset to query.
**options**

type: []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](/docs/datasets/query/filter-by-location#spatial-filter-modes) 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.

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

<h2 id="request-example">Usage example</h2>

```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
}
```

Source: https://tilebox.com/docs/api-reference/go/datasets/Datapoints.QueryPage/index.mdx
