# dataKiosk_getQuery (https://sellersheetai.com/docs/mcp-api/tools/dataKiosk_getQuery)

> Poll Data Kiosk query status.

Access: **READ** · toolset amazon_sp · family sp.dataKiosk_2023-11-15

Auto-downloads document when processingStatus == DONE. Amazon SP-API · getQuery · GET /dataKiosk/2023-11-15/queries/{queryId} Amazon SP-API · getDocument · GET /dataKiosk/2023-11-15/documents/{documentId} When the query is DONE, the response includes documentContent with the full result. If not yet done, call again in a few seconds. On FATAL, read the named errorDocumentId with dataKiosk_getDocument before resubmitting.

## Call it

MCP tool call:

```json
{
  "name": "dataKiosk_getQuery",
  "arguments": {
    "store": "myStore-US",
    "queryId": "<queryId>"
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/dataKiosk_getQuery \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","queryId":"<queryId>"}'
```

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `store` | string | yes | the store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim. |
| `queryId` | string | yes | Query ID from dataKiosk_createQuery response. |

## Result

- `data.queryId` — the polled query id.
- `data.processingStatus` — CANCELLED | DONE | FATAL | IN_PROGRESS | IN_QUEUE
- `data.result.dataDocumentId` — result document id (present only when DONE and the query produced data). NOTE: the field is dataDocumentId, NOT dataDocument.
- `data.result.errorDocumentId` — error document id (present only when the query failed with FATAL and produced an error document). Pass it to dataKiosk_getDocument to read WHY the query failed before resubmitting — human_action names it for you on a FATAL.
- `data.result.documentContent` — auto-downloaded getDocument payload — present only when DONE and a dataDocumentId existed. It is the getDocument response: {documentId, documentUrl, document}, where `document` is the raw document bytes (the actual result rows).
- `data.result.pagination.nextToken` — present when the result spans multiple pages; submit a new dataKiosk_createQuery with the SAME query string plus that token (as paginationToken) to fetch the next page.