Skip to content
Cresva
Developers

Queries API

Access logs of queries made by AI agents to your storefront.

Scope: queries:read

Management API preview
Agent queries are recorded by the live Storefront API. The brand-facing Queries log endpoints documented here ship with the public Management API release.
GET/queries

List agent queries. Returns paginated query logs with filters.

Pagination: All list endpoints support page (default 1), perPage (default 20, max 100), sort, order (asc/desc), since and until (ISO 8601). See Rate Limits for usage best practices.

Query Parameters

sincestringISO 8601 start date
untilstringISO 8601 end date
platformstringFilter by agent platform
bash
curl "https://api.cresva.ai/api/storefront/[brandId]/queries?since=2026-03-01T00:00:00Z&perPage=20" \
  -H "Authorization: Bearer cresva_ak_..."
javascript
const response = await fetch(
  "https://api.cresva.ai/api/storefront/[brandId]/queries?since=2026-03-01T00:00:00Z&perPage=20",
  {
    headers: {
      Authorization: "Bearer " + process.env.CRESVA_API_KEY,
    },
  }
);

const { data } = await response.json();
GET/queries/:id

Retrieve details of a specific query including the response, products shown, and conversion data.

bash
curl "https://api.cresva.ai/api/storefront/[brandId]/queries/qry_9f8e7d6c" \
  -H "Authorization: Bearer cresva_ak_..."
javascript
const response = await fetch(
  "https://api.cresva.ai/api/storefront/[brandId]/queries/qry_9f8e7d6c",
  {
    headers: {
      Authorization: "Bearer " + process.env.CRESVA_API_KEY,
    },
  }
);

const { data } = await response.json();

Query object

JSON
{
  "id": "qry_9f8e7d6c",
  "query": "wireless headphones under $200",
  "platform": "chatgpt",
  "intent": "search",
  "productsReturned": 5,
  "responseTimeMs": 142,
  "createdAt": "2026-03-25T14:30:00Z"
}