Analytics Data
Getting started and querying analytics data via the TollBit CLI
The Analytics API gives you access to the data behind your TollBit dashboard: which AI bots read which pages, where AI referrals land, and how traffic changes day to day. Ask your AI agent questions in plain language, or run read-only SQL yourself.
Access: request it at [email protected]. Once enabled, you'll see it under CLI → Analytics API in your dashboard.
Getting Started
Request Access
Each API is enabled separately for each organization.
- Email [email protected] for access. Please confirm your org name / ID in the message.
- Make sure you can sign in to the TollBit dashboard. You'll approve the CLI's access in your browser while signed in.
The TollBit team will notify you once access is enabled.
Set Up the CLI
To install the TollBit CLI and connect it to your organization, follow the Quickstart. If the CLI is already set up, continue to Querying Data.
Querying Data
The CLI provides a simple way to query your data via your chat agent and plain English. To get started after you sign in, please see a list of the example prompts below.
The agent checks the available data, writes the SQL, runs it, and summarizes the answer. You can also try sample questions below to get started, or ask a specific question of your own.
Site Traffic & Content
See how AI traffic to your site is changing over time.
| Goal | Example Prompt |
|---|---|
| Traffic Mix | Is RAG traffic growing as a share of my AI traffic? Show me RAG vs. training vs. search, month by month, for the past year. |
| Trends | Show me my AI traffic by week since our integration started. |
| Page Paths | Which page paths (or specific URLs) did ChatGPT-User fetch most in the last 7 days? |
| Paywall | Which bots get blocked the most, and which pages do they keep trying to reach? |
| Referrals | Which AI platforms sent us referral traffic last month, and which pages did they land on? |
| Verification | How much Googlebot traffic came from verified Google IP addresses? |
You can also see which pages and sections AI reads, and how that differs between AI platforms.
| Goal | Example Prompt |
|---|---|
| Top pages by bot | What did ChatGPT read most on my site last week, and how does that compare to Perplexity? |
| Sections | Which sections of my site get the most AI traffic? |
| Rising pages | Which pages are suddenly getting much more AI traffic than before? |
Pro Tip: Page-level results can include non-article URLs such as /api/ paths, because bots request them while loading a page. To see articles only, ask the agent to rerun the query and leave out /api/ and other non-article paths.
Advanced Agents
With Advanced Agent Analytics enabled, you can see how AI agents use your site, not just which pages they read. This is the same data as the Advanced Agents tab in the dashboard. Each agent session comes with an AI-written summary of what the agent was doing.
| Goal | Example Prompt |
|---|---|
| Session summaries | What were AI agents doing on my site last week? Show me the longest sessions and summarize them. |
| Task types | What kinds of tasks do agents run on my site (research, bulk collection, product shopping)? Show me the split. |
| Session depth | Which agents run multi-page sessions vs. one-off reads, and how long do their sessions last? |
| Errors | Show me sessions where the agent hit errors, and what it was trying to do when it failed. |
| Actions | Are agents only reading pages, or are they also calling our APIs or submitting forms? |
| Blocked tasks | How often are agents blocked partway through a task, and do they give up or keep trying? |
Brands
With Intelligence enabled, you can see which brands appear in the content AI reads on your site, and how much attention each one gets.
| Goal | Example Prompt |
|---|---|
| Brand Insights | Which brands show up most in the content AI reads on my site? |
| Brand comparison | How does [Brand A] compare to [Brand B] and [Brand C] in AI reads on my site? |
| Coverage gaps | Which brands get a lot of AI attention even though we’ve only written a few pages about them? |
| Rising brands | Which brands got much more AI attention this week than last week? |
| By AI platform | Do ChatGPT and Perplexity read about different brands on my site? |
| Top articles | Which of our articles drive the most AI reads for [Brand]? |
| Blocking | How often does AI try to read about [Brand] on my site and get blocked? |
| By category | In our [shopping / recipe / auto] content, which brands get read the most? |
| Content age | Is AI mostly reading our new articles or our older ones? |
| Content format | Does AI prefer our guides, our reviews, or our news articles? |
| Publish dates | What are the top articles AI reads about [Brand], and when were they published? |
You don’t need brand names before you start. Ask which brands show up most, then pick two or three from that answer to compare.
Pro TipThe more specific the question (time range, site, bot, section), the more detail you're receive back. If an answer looks off, ask the agent to show the SQL it ran.'
In addition, you can set up daily, weekly, or monthly routines with your agent and can even add a follow-up to any of these prompts, such as:
“Export this as a CSV.”
“Turn this into a report I can rerun every week.”
Today, the CLI doesn’t support direct queries on prompts, benchmarking or industry trends. When your agents answer questions on those topics, they’re working from the aggregated log data TollBit returns, so those answers are inferred rather than measured directly.
Technical API Details
In order to make the most of the Analytics API, it's best to get familiar with the types of commands and the full table schema available within the CLI.
Security & Access
-
You approve every connection. No agent can use the CLI on your organization's behalf until someone on your team approves it in the browser.
-
Scoped to your organization. Access is limited to the organization you approved at sign-in.
-
Revoking access. Run tollbit auth logout or tollbit auth logout --all. Running tollbit auth login again also revokes all previous tokens.
-
Credentials stay local. The access token is stored on the machine where the CLI is installed.
-
Verified releases. The CLI is open source under the MIT license and published on GitHub, with checksums and build attestations for each release.
Key Commands
There are two primary command types:
| Command | What It Does |
|---|---|
tollbit analytics schema | Lists the tables and columns you can query, as JSON. Run this first. |
tollbit analytics query "<SQL>" | Runs a single read-only SELECT query and returns the results as JSON. |
Output format. Results come back as JSON with three parts:
- columns: column names and types
- rows: the results, in column order
- meta: row count, whether the results were truncated, bytes scanned and query duration
Saving Results
Redirect the output to a file:
tollbit analytics query "SELECT ..." > results.jsonIf you're using an AI agent, ask it to save the results as a CSV file for you.
Updated 16 days ago