Insights API
Read-only HTTP endpoints for search, leads, analytics and GEO data, authenticated with a Pagecog API key.
The insights API gives read-only data for each site, covering whatever features an admin has switched on: analytics, search, leads and GEO. It uses the same API keys as the insights MCP server. It is for admins and content tools, not for the member AI connector.
How do I get a key?
Sign in as an admin, then go to Admin, then API keys. Name the key, choose All sites (admin) or One site, and copy the secret straight away. It is shown once and only its SHA-256 hash is stored. Revoke a key from the same page.
- Format:
pgc_<8 chars>_<32 chars>. Send it asAuthorization: Bearer <key>. - An admin key reads every site and may ask for lead messages. Pass
siteon every call. - A site key reads its own site only, and
siteis optional. Asking for another site is a 404. Asking for lead messages is a 403. - Keys are never logged.
How do I call it?
GET /api/insights/v1/<endpoint>?site=<id or domain>&... with the Bearer header. Replies are JSON with Cache-Control: no-store.
| Endpoint | Parameters |
|---|---|
sites | none |
search | site, days (7 to 90, default 28), top (default 25), limit (default 25), min_impressions (default 5) |
leads | site, days, include_messages=true (admin key only) |
analytics | site, days, top |
geo | site, limit |
content-inputs | site, days |
curl -H "Authorization: Bearer $PAGECOG_API_KEY" \
"https://pagecog.com.au/api/insights/v1/content-inputs?site=example.com.au"What status codes can come back?
| Code | Meaning |
|---|---|
| 401 | The key is missing, wrong or revoked. |
| 400 | site_required: pass site. |
| 403 | Lead messages were requested without an admin key. |
| 404 | Unknown site or endpoint. |
Trouble with an upstream source is reported inside the body for that source (not_connected or error) and never fails the whole call. A feature that is off is a normal result: { "status": "feature_off", "feature": "geo" }.
What does content-inputs return?
One call per site that bundles the rest for a content writer, under 30 KB. It returns:
search.googleandsearch.bing, each withquestions,long_tail_queries,striking_distance_queries,striking_distance_pages,rising_queriesandfalling_pages.leads.analytics, withpages_that_bring_leads,entry_pages_with_leads,top_pagesandai_assistant.geo.
Lists are cut evenly until the whole reply is under 30 KB. trimmed_to says how many rows each kept.
What do the terms mean?
- Search windows: the last
daysdays ending three days ago, because Search Console lags, compared with the same number of days before. Bing returns the current window only, so itsrisingandfallingare null andprev_*are 0. - long_tail: queries of 8 or more words, by impressions.
- striking_distance: average position 11 to 40 with at least
min_impressions. - rising and falling: more or fewer clicks (then impressions) than the previous window.
- Leads: stored web-form leads, with spam and duplicates excluded, limited to the lead types enabled for the site. Calls and shop clicks are counted in analytics.
- Lead messages: private customer text for question mining. Emails, links and phone numbers are redacted and names are never returned. Never quote or publish them.
- AI-assistant sessions: medium
ai-assistant, or a source naming ChatGPT, OpenAI, Perplexity, Gemini, Copilot, Claude, Anthropic, DeepSeek or meta.ai. - Analytics: completed Sydney days, with traffic exclusions applied.
- GEO:
sharelists every engine. An engine that never produced an answer ismeasured: falsewith null percentages, meaning not measured and never 0.cited_pctis the headline andmentioned_pctis separate.gapsare discovery prompts where no engine cites the site, with the winning domains.discoverylists candidate prompts.not_availablemeans the site has no GEO settings yet.