What it does
Total organic clicks mix two very different things. Branded searches measure demand you already created through product, word of mouth and ads; non-branded searches measure whether SEO is reaching people who have never heard of you. A good launch week can hide a slow decline in the second.
The agent splits last week's clicks with one regular expression for your brand and its misspellings, posts non-branded clicks as the headline, and keeps branded share beside it. Clicks Google does not attribute to any query are shown separately, so the numbers still add up to your total.
How it works
- 1
1Write the brand pattern
One RE2 regular expression covering your brand, product names and common misspellings, for example
(?i)acme|acmeapp|acme ?invoice|akme. Test it against last month's top 500 queries before the first run. 2Count non-branded clicks
searchanalytics.queryfor the last 7 full days withdimensions: ["date"]anddimensionFilterGroups: [{ filters: [{ dimension: "query", operator: "excludingRegex", expression: "<pattern>" }] }].3Count branded clicks and the total
Repeat with
operator: "includingRegex"for branded clicks, and once with no filter for the property total. Any query filter drops anonymized queries, so the total minus both counts is the clicks Google does not tie to a query.- 4
4Build the trend
On the first run, pull 8 weeks with the date dimension and sum by week. After that, add one week per run. Search Console data lags about 2 days, so a Monday run covers the week ending Saturday.
- 5
5Post the tile
Non-branded clicks is the headline. Branded clicks, branded share of attributed clicks and the unattributed remainder go in the glance; the weekly table opens with the card.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/google-search-console-branded-vs-non-branded/install | shRun it
Ask Claude Code:
prompt
Run the google-search-console-branded-vs-non-branded skillOr paste the prompt instead of installing:
prompt
Using the Search Console API (searchanalytics.query), split last week's web clicks (the last 7 days of final data) into branded and non-branded. Use this RE2 brand pattern: (?i)acme|acmeapp|acme ?invoice. Run the query once with an excludingRegex filter on query (non-branded), once with includingRegex (branded) and once with no filter (property total). Report non-branded clicks with the change on the week before, branded clicks, branded share of the two, and the unattributed remainder (total minus both). If this is the first run, give me the last 8 weeks.Put it on a schedule
Mondays at 8:30, from cron on any machine where Claude Code is signed in:
crontab
30 8 * * 1 claude -p "Run the google-search-console-branded-vs-non-branded skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: google-search-console-branded-vs-non-branded
description: "Every Monday: last week's non-branded Google clicks, the branded share, and the trend, split with one brand regular expression. Use when the user asks for this, or when it runs on a schedule."
---
# Search Console branded vs non-branded clicks
Every Monday: last week's non-branded Google clicks, the branded share, and the trend, split with one brand regular expression.
Total organic clicks mix two very different things. Branded searches measure demand you already created through product, word of mouth and ads; non-branded searches measure whether SEO is reaching people who have never heard of you. A good launch week can hide a slow decline in the second.
The agent splits last week's clicks with one regular expression for your brand and its misspellings, posts non-branded clicks as the headline, and keeps branded share beside it. Clicks Google does not attribute to any query are shown separately, so the numbers still add up to your total.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- Read access to the Search Console property, as a full or restricted user.
- A Search Console MCP server, or a service account on the property with `webmasters.readonly`.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Write the brand pattern**: One RE2 regular expression covering your brand, product names and common misspellings, for example `(?i)acme|acmeapp|acme ?invoice|akme`. Test it against last month's top 500 queries before the first run.
2. **Count non-branded clicks** (Google Search Console): `searchanalytics.query` for the last 7 full days with `dimensions: ["date"]` and `dimensionFilterGroups: [{ filters: [{ dimension: "query", operator: "excludingRegex", expression: "<pattern>" }] }]`.
3. **Count branded clicks and the total** (Google Search Console): Repeat with `operator: "includingRegex"` for branded clicks, and once with no filter for the property total. Any query filter drops anonymized queries, so the total minus both counts is the clicks Google does not tie to a query.
4. **Build the trend**: On the first run, pull 8 weeks with the date dimension and sum by week. After that, add one week per run. Search Console data lags about 2 days, so a Monday run covers the week ending Saturday.
5. **Post the tile**: Non-branded clicks is the headline. Branded clicks, branded share of attributed clicks and the unattributed remainder go in the glance; the weekly table opens with the card.
## Route B: the browser
### What you need
- Signed in to Google with at least Restricted access to the Search Console property.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://search.google.com/search-console/performance/search-analytics. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open the Performance report**: The URL opens your last property; switch with the picker at the top left. Set **Search type: Web** and **Date: Last 7 days**, which in Search Console means the last 7 complete days. Turn on **Compare: Previous period** in the date picker.
2. **Count non-branded clicks**: Click **+ New** above the chart, choose **Query**, switch the match to **Custom (regex)** and **Doesn't match regex**, and paste the brand pattern, for example `acme|acmeapp|acme ?invoice|akme`. Read Total clicks for both periods.
3. **Count branded clicks and the total**: Edit the same filter to **Matches regex** for branded clicks. Then remove the filter and read Total clicks for the property; the total minus both counts is the clicks Google does not attribute to a query.
4. **Build the trend on the first run**: Set **Date: Last 3 months** with the non-branded filter on, open the **Dates** tab and **Export** it; sum the daily clicks into weeks, Sunday to Saturday, and keep the last 8. After that, each run adds one week.
Note: Domain properties with enough traffic also get Google's own **Branded** filter in the UI; it uses Google's classification, which will not match your regex, and it is not in the API. Pick one method and keep it so the trend holds. Any query filter drops anonymized queries, so the two filtered counts never add up to the unfiltered total.
## The report
- **Non-branded clicks** last week, with an 8-week trend.
- **Branded clicks** and branded share of the clicks Search Console attributes to queries.
- **Unattributed clicks**: the gap to the property total.
- The brand pattern used, so changes to it are visible.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "google-search-console-branded-vs-non-branded/<date of this run, e.g. 2026-10-16>",
"item_key": "google-search-console-branded-vs-non-branded",
"project": "example.com",
"source": "Search Console branded vs non-branded clicks skill",
"kind": "metric",
"title": "Non-branded clicks up 7% to 6,420",
"metric": {
"label": "Non-branded clicks",
"value": 6420,
"better": "higher",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": {
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "Branded clicks",
"value": 4180,
"delta": 2
}
},
{
"type": "Stat",
"props": {
"label": "Branded share",
"value": 39,
"unit": "%"
}
},
{
"type": "Stat",
"props": {
"label": "Unattributed",
"value": 1150
}
}
]
},
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Week",
"Non-branded",
"Branded",
"Unattributed",
"Total"
],
"align": [
"left",
"right",
"right",
"right",
"right"
],
"rows": [
[
"Oct 5 to 11",
6420,
4180,
1150,
11750
],
[
"Sep 28 to Oct 4",
6000,
4100,
1090,
11190
],
[
"Sep 21 to 27",
5890,
4220,
1120,
11230
],
[
"Sep 14 to 20",
5720,
3980,
1060,
10760
]
]
}
},
{
"type": "Text",
"props": {
"text": "Brand pattern: (?i)acme|acmeapp|acme ?invoice|akme",
"variant": "mono"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Mondays at 8:30 (`30 8 * * 1`). From cron, with the agent signed in on that machine:
```bash
30 8 * * 1 claude -p "Run the google-search-console-branded-vs-non-branded skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/google-search-console-branded-vs-non-branded#schedule
Source: https://briefkin.dev/skills/google-search-console-branded-vs-non-branded
What your agent needs
Read access to the Search Console property, as a full or restricted user.
A Search Console MCP server, or a service account on the property with
webmasters.readonly.
Connecting Google Search Console
- MCP server. Google doesn't publish one for Search Console. Community MCP servers exist; check which scopes one asks for before you sign in.
- API with a service account. Enable the Google Search Console API in a Google Cloud project, create a service account, and add its email under Settings > Users and permissions on the property. Point
GOOGLE_APPLICATION_CREDENTIALSat the key and setGSC_SITE_URLtosc-domain:example.comorhttps://www.example.com/. - OAuth as yourself. When you can't add users to the property, a desktop OAuth client with the
webmasters.readonlyscope and a stored refresh token works for scheduled runs.
Ask for webmasters.readonly and add the service account as a Restricted user; the reports only read.
Questions
Why don't branded and non-branded add up to the total?
Search Console hides rare queries for privacy, and any filter on the query dimension leaves those clicks out. They still count in the unfiltered total. The card shows the gap as unattributed so nothing is lost; on most sites it is 5 to 15% of clicks.
Search Console has a branded queries filter now. Why a regex?
Google added a branded queries filter to the Search Console interface in late 2025, for domain properties with enough data, but as of October 2026 the API offers no brand dimension or filter, so a scheduled agent cannot read it. A regular expression you control also stays stable from week to week, which keeps the trend honest.
Do I need Briefkin to use the Search Console branded vs non-branded clicks skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Google Search Console pages themselves: the agent opens search.google.com/search-console/performance/search-analytics in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.