Citation Intelligence

v0.13.0
io.github.AutomateLab-tech/citation-intelligence Checked 4 days ago Published 3 days ago

Check what Perplexity, Claude, ChatGPT, Gemini, and Google AI Overviews cite for any query.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

citations_check

Return URLs cited by an AI engine (Perplexity, Claude, ChatGPT, Gemini, or Bing) for a query. Use this when an agent or user wants to see what sources an AI search engine grounds answers on. Requires at least one engine API key; auto-picks the first available.

ParameterTypeDescription
query *stringThe search query to test (what would a user ask an AI?)
enginestringEngine to query. • perplexity / google_ai_mode — consumer_scrape: closest to real product behavior. • claude / openai / gemini — api_proxy: API-tier call, may differ from consumer product. •…
max_resultsintegerMaximum citations to return.
perplexity_modelstringPerplexity model override (e.g. 'sonar', 'sonar-pro', 'sonar-reasoning'). Only used when engine='perplexity'. Defaults to 'sonar-pro'.

domain_am_i_cited

Check whether a domain is cited by an AI engine across a cluster of queries. Returns per-query presence, rank, and a citation-rate summary. Use to measure visibility for a brand, product, or content site in AI search.

ParameterTypeDescription
domain *stringDomain to check, e.g. 'automatelab.tech' (without protocol).
queries *arrayQueries to test the domain against. 1-20 queries per call.
enginestringLLM engine to check for citations. 'auto' runs all available LLM engines and returns per-engine breakdown + cross-engine consensus. Pin to a specific engine to reduce cost. 'bing_serp' and 'brave_serp…

signals_ai_overview

Check whether Google shows an AI Overview for a query, and which URLs it cites. Uses SerpAPI (free tier: 100/month). Set SERPAPI_KEY.

ParameterTypeDescription
query *stringSearch query to check for Google AI Overview.
hlstringLanguage code, default 'en'.
locationstringLocation string, e.g. 'United States'. Affects AI Overview eligibility.

domain_cited_for

List queries that the given domain has been cited for, served from the local cache. Build up a corpus by calling check_citations or am_i_cited first; cited_for queries it without spending API budget.

ParameterTypeDescription
domain *stringDomain to look up, e.g. 'automatelab.tech'.
enginestringFilter by engine. Omit to include all.
limitintegerMaximum results.
sincestringISO date floor, e.g. '2026-01-01'. Only return entries fetched on or after this date.

citations_predict

Score citation likelihood for a URL from public signals (Wikipedia link presence, schema.org markup, /llms.txt, GitHub and Reddit references, canonical hygiene, HTTPS). No LLM fired - all heuristic. Returns 0-100 score, grade, signal breakdown, and ranked fixes.

ParameterTypeDescription
url *stringURL to score for citation likelihood. Must be absolute http(s).

panel_track

Save, load, or list named query panels. A panel is a persisted set of queries you want to monitor over time (e.g. editorial-watchlist). Use action=save with queries[] to create, action=load to read, action=list to enumerate. Panels live under <config>/panels/<name>.json.

ParameterTypeDescription
name *stringPanel name, e.g. 'editorial-watchlist'. Used to save and recall the query set.
actionstring'save' writes the panel, 'load' returns an existing panel, 'list' enumerates all panels.
domainstringDefault domain to track for this panel, e.g. 'automatelab.tech'.
queriesarrayQueries to save under this panel. Omit to read the existing panel.

panel_run

Run a saved panel through am_i_cited and append a timestamped snapshot. Side effects: makes external API calls to the configured AI engine (costs API quota); writes one snapshot file to disk at <config>/snapshots/<panel>/<iso>.json. Requires at least one engine API key (same as am_i_cited). Returns per-query citation presence and a citation_rate summary for the run. Use panel_track to create a panel first; use citations_trend to read the accumulated trend after multiple runs.

ParameterTypeDescription
name *stringPanel name previously saved via track_queries.
domainstringOverride the panel's default domain for this run.
enginestringAI engine to query. Use bing_serp/brave_serp for web_rank comparison only — am_i_cited will refuse them.

report_visibility

Turnkey AI visibility report for a domain across a query set. Composes check_citations over every query (or a saved panel) and returns the metrics AI-visibility trackers sell as a dashboard, in one call: mention frequency (citation_rate), share_of_voice vs competitors, average rank when cited, and brand sentiment from the answer text. Side effects: one check_citations call per query (costs API quota for uncached queries; cached queries are free). Returns structured summary + top_domains + per_query, plus a rendered Markdown report (include_markdown=true) suitable for a public page. Provide que…

ParameterTypeDescription
domain *stringThe domain you are measuring visibility for (e.g. automatelab.tech).
brand_termsarrayBrand name variants to detect in answer text for sentiment (defaults to the domain's second-level label).
competitorsarrayOptional competitor domains to surface explicitly in the share-of-voice table.
enginestringAI engine to query. 'auto' picks the first configured key. Same selection as check_citations.
include_markdownbooleanIf true (default), include a rendered Markdown report under `markdown`.
max_resultsintegerMax citations to pull per query.
panelstringName of a saved panel (see panel_track) to pull queries from. Provide this OR `queries`.
queriesarrayQueries to run. Provide this OR `panel`. Each is sent to the AI engine via check_citations.

citations_trend

Report citation rate over time for a panel from stored snapshots. Read-only; cache-only — makes no API calls to any AI engine and costs no API quota. Reads snapshot files from <config>/snapshots/<panel>/. Returns: snapshots[] (one entry per panel_run invocation, each with timestamp and citation_rate), plus per-query deltas (gained/lost/unchanged) comparing first vs last snapshot. Returns an empty series when no snapshots exist yet. No auth required. No rate limits. Use panel_run to accumulate snapshots first; use since to restrict the time window.

ParameterTypeDescription
panel *stringPanel name to report on.
sincestringISO date floor, e.g. '2026-01-01'. Only include snapshots on or after.

competitors_compare

Run predict_citation on 2-10 URLs and return a side-by-side signal table plus a list of signals where the URLs diverge. Use to compare your URL to top-cited competitors for the same query.

ParameterTypeDescription
urls *arrayURLs to compare side-by-side. 2-10 URLs. One is typically yours and the rest are cited competitors.

signals_wikipedia

List Wikipedia articles that reference the given domain. Read-only. One HTTPS GET to the Wikipedia API (en.wikipedia.org/w/api.php?action=query&list=exturlusage). No auth required; no API keys; no rate limits beyond Wikipedia's public API fair-use policy (~1 request/second). Returns article titles and URLs. Wikipedia backlinks are the highest-lift signal for LLM training corpora — a domain cited from Wikipedia is far more likely to appear in AI training data and citation pools. Use lang to query non-English Wikipedias.

ParameterTypeDescription
domain *stringDomain to search for, e.g. 'automatelab.tech' (without protocol).
langstringWikipedia language subdomain, e.g. 'en', 'de', 'fr'.
limitintegerMaximum mention rows to return.

audit_sitemap

Fetch a sitemap.xml (or sitemap index) and run predict_citation on every URL. Returns results sorted worst-score-first. Surfaces systemic issues across a whole site in one pass. Zero engine keys needed.

ParameterTypeDescription
sitemap_url *stringURL of sitemap.xml (or a sitemap index). Nested sitemaps are followed.
concurrencyintegerParallel predict_citation calls. Higher is faster but more rate-limit risk.
limitintegerMax URLs to score. Sitemap is sliced after parsing.

competitors_compete

End-to-end competitive snapshot for a single query. Calls check_citations to get the cited URLs, then runs compare_domains on your_url vs the top cited competitors. Returns your score, the average competitor score, and the gap.

ParameterTypeDescription
query *stringSearch query to test (what would a user ask an AI?).
your_url *stringYour URL to benchmark against the cited competitors.
enginestringAI engine to query for the citation set. 'auto' picks the first available key.
max_competitorsintegerHow many cited URLs to compare against your_url. Capped at 9 (compare_domains accepts max 10 URLs total including yours).

citations_freshness

Score how recent the pages cited for a query are. Calls check_citations, then collects dateModified for each cited URL, returns a 0-100 recency_score (halflife=365d) plus per-URL freshness bucket (fresh/current/stale/ancient/unknown). Surfaces queries where AI cites old content - opportunity to ship fresher.

ParameterTypeDescription
query *stringSearch query whose cited URLs to score for freshness.
enginestringAI engine to query for the citation set.
max_resultsintegerHow many cited URLs to inspect.

domain_cited_for_diff

Diff cited_for between two time windows for a domain. Returns queries gained (cited now, not before baseline_until) and queries lost (cited before, not since current_since). Cache-only, no API spend. Use to track citation drift over time after publishing or migrating content.

ParameterTypeDescription
baseline_until *stringISO date (or ISO datetime). Baseline window = all cache entries fetched on or before this timestamp.
domain *stringDomain to diff, e.g. 'automatelab.tech'.
current_sincestringISO date floor for the 'current' window. Defaults to baseline_until.
enginestringFilter by engine. Omit to include all.

signals_gsc_gap

Join Google Search Console performance with am_i_cited per query. Surfaces queries where the domain ranks well in Google but is not cited in AI - the closest editorial wins. Requires GCP service account creds (credentials_path or GOOGLE_APPLICATION_CREDENTIALS env).

ParameterTypeDescription
domain *stringDomain to analyze, e.g. 'automatelab.tech'. Used both for the GSC site URL and the citation check.
end_date *stringISO date for GSC range end, e.g. '2026-05-01'.
queries *arrayQueries to cross-reference. 1-20 per call.
start_date *stringISO date for GSC range start, e.g. '2026-04-01'.
credentials_pathstringPath to GCP service account JSON. Defaults to env GOOGLE_APPLICATION_CREDENTIALS.
enginestringAI engine for the citation check.
site_urlstringOverride the GSC siteUrl. Defaults to 'sc-domain:<domain>'.

signals_bing_gap

Join Bing Webmaster Tools query stats with am_i_cited per query. Surfaces queries where the domain ranks well in Bing but is not cited in AI - the closest editorial wins. Bing's index backs Copilot/ChatGPT/Perplexity grounding, so a Bing rank gap is an LLM-citation gap. Requires BING_WEBMASTER_API_KEY (Bing Webmaster Tools -> Settings -> API Access).

ParameterTypeDescription
domain *stringDomain to analyze, e.g. 'automatelab.tech'. Used for the citation check.
queries *arrayQueries to cross-reference. 1-20 per call.
enginestringAI engine for the citation check.
site_urlstringVerified Bing Webmaster site URL. Defaults to 'https://<domain>/'. Bing uses the https origin WITH a trailing slash, NOT the sc-domain: form GSC uses.

audit_schema

Deep schema.org validation for a URL. Parses every JSON-LD block and microdata node, checks required fields per @type (Article needs headline+author+datePublished, FAQPage needs mainEntity, HowTo needs step, etc.), and flags missing fields and malformed JSON-LD. Returns issues list and a valid/invalid verdict. Use to fix structured-data bugs that predict_citation flags but can't explain.

ParameterTypeDescription
url *stringURL whose JSON-LD and microdata to validate against schema.org expected fields.

audit_llms_txt

Generate an llms.txt file (https://llmstxt.org spec) from a sitemap. Parses sitemap.xml + nested indexes, groups URLs by top-level path, and emits a Markdown document with H1+description+sectioned link lists. Set fetch_titles=true to pull <title> per URL (slower, richer output).

ParameterTypeDescription
site_title *stringSite title - top H1 in the generated llms.txt file.
sitemap_url *stringURL of sitemap.xml (or sitemap index). Nested sitemaps are followed.
fetch_titlesbooleanIf true, fetch each URL to extract <title> for richer links. Slower (one HEAD-ish GET per URL). Default false uses the URL path as the link text.
limitintegerMax URLs to include. Truncated after sitemap parse, before title fetch.
site_descriptionstringOne-paragraph site description placed under the H1. Optional but strongly recommended.

signals_answer_box

Locate where each cited URL appears in the AI's raw answer text. Calls check_citations, finds the first mention of each citation's URL (or hostname) in raw_answer, and bins by char position into early/middle/late thirds. Surfaces whether your URL is cited up-front or buried near the end. Returns 'unknown' for engines without raw_answer (Bing, Brave).

ParameterTypeDescription
query *stringSearch query whose AI answer to measure citation positions on.
enginestringAI engine to query. web_rank engines (bing_serp, brave_serp) lack raw_answer and will return position 'unknown'.
max_resultsintegerMax citations to locate.

citations_provenance

Fan a query out across multiple AI engines and report per-URL cross-engine consensus. Returns each unique cited URL with the list of engines that cited it, plus a consensus_urls list (URLs cited by ALL engines). High engine_count = strong cross-engine citation signal; engine_count=1 = engine-specific.

ParameterTypeDescription
query *stringSearch query to fan out across multiple engines.
enginesarrayEngines to query. If omitted, uses all LLM engines with a configured API key (perplexity, claude, openai, gemini, google_ai_mode). Include bing_serp/brave_serp only when you explicitly want web_rank c…
max_resultsintegerMax citations per engine.

citations_evidence

Extract the cited snippet from the AI engine's raw answer for each citation. Calls check_citations, then for each returned URL finds the first mention in raw_answer and returns a context window plus the nearest quoted span or containing sentence. Use to see *why* an engine cited a URL, not just *that* it did. Returns 'not found' for engines without raw_answer (Bing, Brave).

ParameterTypeDescription
query *stringSearch query whose AI answer to extract citation evidence from.
context_charsintegerHalf-width of the snippet window around each citation mention (chars). Total snippet is up to 2x this.
enginestringAI engine to query. web_rank engines (bing_serp, brave_serp) lack raw_answer and return no evidence.
max_resultsintegerMax citations to extract evidence for.

audit_crawler_access

Verify that major AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, Applebot-Extended, Bytespider, Meta-ExternalAgent, plus real-time fetch UAs) can fetch a URL. Parses robots.txt and does a live GET with each bot's User-Agent. Surfaces robots.txt blocks AND UA-based gating that breaks AI citation.

ParameterTypeDescription
url *stringPage URL to test for AI crawler access.
botsarrayOverride the default bot list. Each entry is a User-Agent token (e.g. 'GPTBot', 'ClaudeBot').
fetch_with_uabooleanIf true, do a live GET as each bot's User-Agent and report status. Disable to only parse robots.txt (no extra requests).

audit_sitemap_map

Cross-reference a sitemap with the citation cache. For each sitemap URL, reports whether it appears in cached citations (and how many queries/engines cited it). Inverse of audit_sitemap: not 'how citable is each URL', but 'has each URL actually been cited yet'. Cache must be primed via check_citations or run_panel first.

ParameterTypeDescription
sitemap_url *stringURL of sitemap.xml (or a sitemap index). Nested sitemaps are followed.
domainstringDomain to look up citations for. If omitted, inferred from the sitemap host.
limitintegerMax sitemap URLs to consider.
sincestringISO date floor; only count citations recorded on or after this date.

competitors_canonical_set

Fan a query across engines and aggregate citations by registered domain (not URL). Returns top competitor domains ranked by cross-engine consensus, with per-engine breakdown and top URLs per domain. Use to identify the canonical competitor set for a query - the domains every engine treats as authoritative.

ParameterTypeDescription
query *stringSearch query to fan out across engines.
enginesarrayEngines to query. If omitted, uses all LLM engines with a configured API key (google_ai_mode, perplexity, claude, openai, gemini). Include bing_serp/brave_serp only for web_rank comparison.
exclude_domainsarrayDomains to filter out (e.g. your own brand, Wikipedia, Reddit). Suffix-match.
max_resultsintegerMax citations per engine.
top_nintegerMax competitor domains to return.

audit_structured_data

Suggest missing JSON-LD additions for a URL. Fetches the page, detects existing schema types, and returns ready-to-paste templates for types that are missing but signalled by page content (BlogPosting from og:type=article or bylines, FAQPage from Q&A pairs, HowTo from numbered steps, BreadcrumbList from nested paths, Organization on homepages). Templates are pre-filled from page metadata where possible; fields marked FILL: require manual completion.

ParameterTypeDescription
url *stringURL to inspect for missing JSON-LD. The page is fetched and its content signals are used to suggest schema types.