What you need
How it works
GET /projects/{project_id}returns the brand’sdomain, so the script can spot your own pages.GET /projects/{project_id}/citations?limit=100returns cited URLs, most cited first. The script followsnext_cursoruntil it’snull.- Each URL has
times_cited(how often answers cited it) andtimes_retrieved(how often an engine’s web search retrieved it, cited or not). The script sums both per domain.
Code
Expected output
Read the results
- Share is the domain’s portion of all citations for this brand’s prompts. A few domains with a large share are where you should aim to be cited, through PR, reviews or partnerships.
- Retrieved much higher than cited means engines find that domain’s pages but rarely use them in answers. Compare their content with the pages that do get cited.
- Your own rank is the quickest health check for content work. Track it over time by saving each run’s output.
Variations
Only one domain's pages
Only one domain's pages
Pass
domain= to filter server-side, for example GET /projects/{project_id}/citations?domain=acme.com. The filter is a case-insensitive substring match, so it also matches subdomains such as blog.acme.com.Your most cited pages
Your most cited pages
Filter with
domain= set to your own domain and print each url with its times_cited. These are the pages AI engines already trust.Recently active sources
Recently active sources
Each source has
first_seen and last_seen. Keep only sources with a last_seen in the last 30 days to see who is cited now, not historically.