Google SEO APIs
AgriciDaniel/claude-seo
Pulls real Google data for SEO work: Search Console, PageSpeed Insights, CrUX field data, the Indexing API and GA4 organic traffic, through /seo google commands.
Build a runReport request against the GA4 Data API v1 — pick valid metric/dimension combinations, set date ranges that respect data-freshness limits, apply filters, paginate large result sets…
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-query --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .claude/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .claude/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-queryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-query --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .agents/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .agents/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-query --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .cursor/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .cursor/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/ga4-data-api-query--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-query --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .gemini/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .gemini/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-queryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .github/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .github/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace ga4-data-api-query --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/ga4-data-api-query .opencode/skills/ga4-data-api-query && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ga4-data-api-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/ga4-data-api-query into .opencode/skills/ga4-data-api-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ga4-data-api-query", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ga4-data-api-queryBuild a runReport request against the GA4 Data API v1 — pick valid metric/dimension combinations, set date ranges that respect data-freshness limits, apply filters, paginate large result sets…
Ga4 Data API Query is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build a runReport request against the GA4 Data API v1 — pick valid metric/dimension combinations, set date ranges that respect data-freshness limits, apply filters, paginate large result sets, handle sampling thresholds. Trigger with "query GA4", "GA4 Data API", "runReport", "fetch GA4 metrics", "GA4 pageviews", "GA4 sessions".
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code
It works with Google Analytics. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(python3:*)Bash(curl:*)From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
ga-dev-tools.googleFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Ga4 Data API Query loads about 2.4k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 716 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 716 words, ~2,404 tokens.
.claude/skills/ga4-data-api-query/SKILL.md (or your agent's skills folder).The Data API v1 is the canonical read path for GA4. One endpoint (runReport) covers most use cases. Two paths matter for picking the right query: dimensions describe rows (date, page, source), metrics describe values (sessions, users, events). Not every combination is valid — see "Compatibility" below.
Prerequisite: auth working (see ga4-auth-setup).
ga4-auth-setup first.google-analytics-data package.from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import (
RunReportRequest, DateRange, Metric, Dimension,
)
client = BetaAnalyticsDataClient()
req = RunReportRequest(
property="properties/123456789", # YOUR property ID (digits only)
date_ranges=[
DateRange(start_date="30daysAgo", end_date="today"),
],
metrics=[Metric(name="activeUsers")],
dimensions=[Dimension(name="date")],
)
resp = client.run_report(req)
for row in resp.rows:
date = row.dimension_values[0].value # YYYYMMDD string
users = row.metric_values[0].value # numeric string
print(f"{date}: {users}")That's the full skeleton. Everything below extends this shape.
| Metric | What it counts | Notes |
|---|---|---|
activeUsers | Unique users with engagement in the window | The "users" people mean by default |
newUsers | First-seen users in the window | |
totalUsers | All users (engaged or not) — superset of activeUsers | |
sessions | Sessions started in the window | Re-engages after 30min inactivity |
engagedSessions | Sessions ≥10s OR ≥2 pageviews OR ≥1 conversion | The "good" sessions |
screenPageViews | Pageviews + app screenviews combined | What people mean by "pageviews" |
eventCount | Total event count (every event, not just page_view) | Often misleadingly large |
bounceRate | (sessions - engagedSessions) / sessions | Lower is better |
averageSessionDuration | Avg seconds per session | Across sessions, not engagedSessions |
eventsPerSession | eventCount / sessions | |
conversions | Events flagged as conversions in the property setup | Property-specific |
totalRevenue | Sum of purchase event revenue | Currency = property default |
bounceRate and averageSessionDuration are ratios — don't SUM them across rows; they're already aggregated within each row's group.
| Dimension | Cardinality | When to use |
|---|---|---|
date | Low (1/day) | Time series |
dateHour | Med | Intra-day patterns |
pagePath | High | Top-pages reports |
pageTitle | High | When path is opaque (e.g. SPA hash routes) |
sessionSource / sessionMedium | Med | Attribution |
sessionDefaultChannelGrouping | Low (~12 channels) | High-level traffic source breakdown |
country / region / city | Med / Med / High | Geo |
deviceCategory | Low (desktop/mobile/tablet) | |
browser / operatingSystem | Med | Tech audit |
landingPage | High | Entry-page reports |
eventName | Med | Event-level breakdowns |
customEvent:<name> | Property-specific | If you defined custom dimensions in the property setup |
GA4 enforces a compatibility matrix at the API level. If you ask for sessions + customEvent:purchaseId together you may get an empty result or a 400 INVALID_ARGUMENT. Two rules cover ~90% of cases:
metadata.dataLossFromOtherRow=true. Check it.If you're unsure, query the compatibility metadata endpoint:
from google.analytics.data_v1beta.types import CheckCompatibilityRequest
compat = client.check_compatibility(CheckCompatibilityRequest(
property="properties/123456789",
dimensions=[Dimension(name="pagePath"), Dimension(name="sessionSource")],
metrics=[Metric(name="screenPageViews"), Metric(name="sessions")],
))
print(compat)Filters are nested expressions. The common case: filter rows by a dimension value.
from google.analytics.data_v1beta.types import (
FilterExpression, Filter, FilterExpressionList,
)
# Just pages under /docs/
docs_only = FilterExpression(
filter=Filter(
field_name="pagePath",
string_filter=Filter.StringFilter(
match_type=Filter.StringFilter.MatchType.BEGINS_WITH,
value="/docs/",
case_sensitive=False,
),
),
)
# AND combine: organic search AND not from referrer "spam.com"
combined = FilterExpression(
and_group=FilterExpressionList(expressions=[
FilterExpression(filter=Filter(
field_name="sessionMedium",
string_filter=Filter.StringFilter(
match_type=Filter.StringFilter.MatchType.EXACT,
value="organic",
),
)),
FilterExpression(not_expression=FilterExpression(filter=Filter(
field_name="sessionSource",
string_filter=Filter.StringFilter(
match_type=Filter.StringFilter.MatchType.EXACT,
value="spam.com",
),
))),
]),
)
req = RunReportRequest(
property="properties/123456789",
date_ranges=[DateRange(start_date="30daysAgo", end_date="today")],
metrics=[Metric(name="sessions")],
dimensions=[Dimension(name="pagePath")],
dimension_filter=docs_only,
)Use metric_filter for filtering by metric (e.g. only rows where sessions > 100). Same shape.
| Form | Meaning |
|---|---|
"2026-05-01" | Absolute (ISO date) |
"30daysAgo" | Relative — N days before today |
"yesterday", "today" | Named relative |
"NdaysAgo" to "today" | Standard rolling window |
GA4 has 48-hour data freshness — today's numbers fluctuate; yesterday's settle ~24h after midnight in the property's timezone; numbers older than 48h are stable. Don't draw conclusions from "today" alone.
Multiple date_ranges in one request gives you a comparison report:
DateRange(start_date="30daysAgo", end_date="yesterday", name="current"),
DateRange(start_date="60daysAgo", end_date="31daysAgo", name="prior"),The response will have dateRange as an extra dimension on each row.
req = RunReportRequest(
# ... as above
limit=10_000, # max 250_000 per request
offset=0,
)
resp = client.run_report(req)
# resp.row_count is the TOTAL matching rows; resp.rows is the current page
while resp.row_count > req.offset + len(resp.rows):
req.offset += len(resp.rows)
resp = client.run_report(req)
# process resp.rowsFor result sets over ~1M rows, use ga4-bigquery-export instead.
resp = client.run_report(req)
if resp.metadata.data_loss_from_other_row:
print("WARNING: data was sampled. Tighten date range, drop high-cardinality dimensions, or use BigQuery export for unsampled data.")If sampled, results are statistically valid but not exact. For exact counts, BigQuery export is the only path.
A successful runReport response contains dimension and metric values in rows, plus response metadata for pagination and data-quality signals. The examples print those rows; production callers should retain the metadata and handle empty result sets explicitly.
| Error | Cause | Fix |
|---|---|---|
400 INVALID_ARGUMENT: dimension X is incompatible with metric Y | Compatibility matrix violation | Use check_compatibility to find a valid combination |
400 The request must contain at least one valid dimension | All dimensions in the list are invalid (typo, deprecated name) | Check the Dimensions & metrics explorer |
503 RESOURCE_EXHAUSTED | Per-property quota hit | Wait 1h or raise quota; batch fewer queries |
Empty rows despite valid query | Date range outside data window OR property has no data for that period | Sanity-check with a known-good query (e.g. activeUsers over today) |
ga4-auth-setup — prerequisitega4-realtime-api — for "right now" data instead of runReport's ~24h lagga4-common-reports — copy-paste recipes for the canonical 6-7 reportsga4-bigquery-export — when you've outgrown the Data API© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/.curated/ga4-data-api-query of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Ga4 Data API Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ga4 Data API Query this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Google SEO APIsAgriciDaniel/claude-seo | 19k | 1 repos | ~4.2k | Automated safety check: Pass | MIT | |
| AnalyticsNexus-JPF/note-companion | 870 | 7 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Blog GoogleAgriciDaniel/claude-blog | 2.3k | 1 repos | ~3.3k | Automated safety check: Notes | MIT | |
| SEO GoogleAgriciDaniel/codex-seo | 799 | 2 repos | ~3.4k | Automated safety check: Pass | MIT | |
| C15tc15t/c15t | 1.9k | 1 repos | ~1.6k | Automated safety check: Pass | Apache-2.0 |
AgriciDaniel/claude-seo
Pulls real Google data for SEO work: Search Console, PageSpeed Insights, CrUX field data, the Indexing API and GA4 organic traffic, through /seo google commands.
Nexus-JPF/note-companion
When the user wants to set up, improve, or audit analytics tracking and measurement.
AgriciDaniel/claude-blog
Google API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity…
AgriciDaniel/codex-seo
Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic.
c15t/c15t
Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.
Ryze-AI-Adgent/open-seo-mcp-skills
Measure real AI-engine visibility — traffic from ChatGPT, Perplexity, Claude, Gemini and which pages they cite — from actual GA4 referral data, not prompt sampling.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Build a runReport request against the GA4 Data API v1 — pick valid metric/dimension combinations, set date ranges that respect data-freshness limits, apply filters, paginate large result sets…. Ga4 Data API Query is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build a runReport request against the GA4 Data API v1 — pick valid metric/dimension combinations, set date ranges that respect data-freshness limits, apply filters, paginate large result sets, handle sampling thresholds.
Ga4 Data API Query fits situations like: fetch GA4 metrics.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a claude-code`. Or copy the skill folder (skills/.curated/ga4-data-api-query in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/ga4-data-api-query in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a codex`. Or copy the skill folder (skills/.curated/ga4-data-api-query in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/ga4-data-api-query in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill ga4-data-api-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ga4-data-api-query, .gemini/skills/ga4-data-api-query, .github/skills/ga4-data-api-query and .opencode/skills/ga4-data-api-query in your project.
SKILL.md names no scripts, command-line tools or credentials: Ga4 Data API Query is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash(python3:*), Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 1 domain. As links in the text: ga-dev-tools.google. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ga4 Data API Query is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ga4 Data API Query: Google SEO APIs (AgriciDaniel/claude-seo, 19k stars), Analytics (Nexus-JPF/note-companion, 870 stars), Blog Google (AgriciDaniel/claude-blog, 2.3k stars) and SEO Google (AgriciDaniel/codex-seo, 799 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.