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

# analyticsQueryRows

> Run a validated analyticsQueryPlan without creating a report, or page the same saved result. The first page runs once; later pages use its cursors and do not rerun. Results expire after about a day. Present the answer and relevant limitations, then offer to save it as a report for future use and CSV exports. On yes, call analyticsReportCreateFromPlan with the same planId. For an explicit report or CSV request, use the report tools directly. Pages hold up to 500 rows, 100 by default; agents should aggregate rather than reading more than about 1,000 rows. At most 100,000 rows are pageable; save a report and export for more. Null for an unknown plan or another user's or store's plan.

**Required scopes:** [`analytics_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-analytics_read)

## Arguments

**after** `String`

Read rows after this result cursor.

**before** `String`

Read rows before this result cursor.

**first** `Int`

Forward page size, up to 500; defaults to 100.

**last** `Int`

Backward page size, up to 500.

**planId** `ID!` *required*

The validated planId from analyticsQueryPlan.

## Returns

**analyticsQueryRows** `[AnalyticsQueryRowConnection](/docs/api-reference/v3/pagination)`

Rows from one ad hoc analytics execution. Saving the plan later creates a report with the same query; the report's data refreshes when read.

**fields**

**columns** `[\[AnalyticsReportResultColumn!\]!](/docs/api-reference/v3/reference/analytics/analytics-report-result-column)` *required*

Columns in the order of each row's values.

**fields**

**decimalPlaces** `Int`

How many decimal places the merchant shows. Null for the default.

**key** `String!` *required*

The column's stable key, used to sort or relabel it with `analyticsReportUpdate`.

**kind** `[AnalyticsReportColumnKind!](/docs/api-reference/v3/reference/analytics/analytics-report-column-kind)` *required*

What the column holds.

**label** `String!` *required*

The column's header.

**edges** `[\[AnalyticsReportRowEdge!\]!](/docs/api-reference/v3/pagination)` *required*

Rows with paging cursors.

**fields**

**cursor** `String!` *required*

The row's position in this result; pass to `after` or `before` to page from here.

**node** `[AnalyticsReportRow!](/docs/api-reference/v3/reference/analytics/analytics-report-row)` *required*

The row.

**fields**

**values** `[\[JSON\]!](/docs/api-reference/v3/reference/common/json)` *required*

The row's values in the order of the connection's `columns`. Exact numbers (number, currency, percent, and integers too large for JSON) are decimal strings, a date is `YYYY-MM-DD`, a datetime is an ISO-8601 instant. A missing value is null.

**nodes** `[\[AnalyticsReportRow!\]!](/docs/api-reference/v3/reference/analytics/analytics-report-row)` *required*

Rows without cursors.

**fields**

**values** `[\[JSON\]!](/docs/api-reference/v3/reference/common/json)` *required*

The row's values in the order of the connection's `columns`. Exact numbers (number, currency, percent, and integers too large for JSON) are decimal strings, a date is `YYYY-MM-DD`, a datetime is an ISO-8601 instant. A missing value is null.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**planId** `ID!` *required*

Pass to analyticsReportCreateFromPlan after the user agrees to save this answer. Do not replan or ask for a second confirmation.

**resultCreatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When this query produced its result.

**resultExpiresAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When these result cursors expire. Run the plan again afterward.

**timezone** `String!` *required*

IANA timezone used for this execution.

**totalCount** `Int!` *required*

Total rows in the saved result.

## Example

```graphql theme={null}
query {
  analyticsQueryRows(after: "...", before: "...", first: 10, last: 10, planId: "...") {
    nodes {
      values
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


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