Getting started

Create a read-only API key and call the DataGlass API directly from your own script or agent.

If you'd rather wire DataGlass into your own script, notebook, or custom agent — instead of the one-click ChatGPT or Claude connectors — you can issue an API key and call the DataGlass REST API directly. An API key (also called a Personal Access Token) carries the same access your account has, but read-only.

Create a key

  1. Open the account menu (top-right) and go to Settings → API keys.
  2. Click Create API key.
  3. Give it a label you'll recognize later (e.g. "Profit script" or "Claude Desktop") and, optionally, an expiryNever, 30, 60, 90, or 365 days.
  4. Copy the token that appears. It starts with dg_pat_.
The token is shown exactly once. We store only a hash of it, so we can't show it again — if you lose it, revoke the key and create a new one.

Call the API

Send the token as a Bearer token on the Authorization header. The API lives at https://prod-api.dataglasslabs.com.

# List your connected Shopee shops
curl https://prod-api.dataglasslabs.com/api/shopee/fetch-all-user-shops \
  -H "Authorization: Bearer dg_pat_your_token_here"

Most endpoints are POST and take a JSON body — send Content-Type: application/json:

# Free-text product search
curl -X POST https://prod-api.dataglasslabs.com/api/canonical-product-controller/canonical/search-products \
  -H "Authorization: Bearer dg_pat_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{ "query": "phone case" }'

Every request runs as you — it sees exactly the shops, products, orders, and reports your account can see, and nothing from anyone else's.

What you can reach

API keys can call the read side of DataGlass: your products and unified catalog, orders, financial breakdowns, True ROAS, inventory, and the same recommendations that power your Actions. A key you create here has no scope picker, so it is read-only by construction. The ChatGPT and Claude connectors read the same data, but an assistant can additionally request per-domain write scopes that you approve at connect time — see Permissions and safety.

There is no publicly reachable OpenAPI spec today. An agent spec is generated internally from the live access rules — so it can never list an endpoint a key would be denied — but it is not currently served to the public internet. The endpoint references below are the authoritative public list.

This documentation groups the same endpoints into four references:

Conventions

A few things that apply to every endpoint:

  • Base URLhttps://prod-api.dataglasslabs.com. All documented paths are relative to it.
  • Auth — send your key as Authorization: Bearer dg_pat_… on every request.
  • Response envelope — responses are wrapped as { "status": "SUCCESS", "statusCode": 200, "message": …, "data": <result> }. The Response type shown for each endpoint is the shape of data.
  • Datesdate-typed fields that carry a time component are serialized as arrays: [year, month (1-based), day, hour, minute, second].
  • region — marketplace region code (e.g. TH). shopId / sellerId — the platform identifiers returned by the shops endpoints in Products & orders.
  • Pagination — cursor-paginated endpoints return { rows/data, nextCursor }; pass nextCursor back to fetch the next page. Offset-paginated (v3) endpoints take page (0-based) + pageSize and return totalItems / totalPages.
  • Rate limit — 60 requests/minute per key; see API security & limits.

Manage and revoke

Back on Settings → API keys you'll see every key with its label, prefix, last-used date, expiry, and status. Click Revoke on any key to disable it immediately and permanently — do this the moment a token might be exposed.

For the read-only policy, rate limits, and the rest of the safety rules around keys, see API security & limits.