Skip to main content
← Back to Blog

API-First AI Monitoring

AI Search Monitoring API: Track Citations, Alerts, and BI Metrics

Your marketing stack already has a BI tool, a Slack workspace, and a dozen internal dashboards. Here is how to pipe AI search visibility data, cited URLs, competitors, and score changes directly into the tools your team already uses.

Why API-First Matters for AI Monitoring

Most AI visibility tools give you a dashboard and expect you to check it. That model breaks down fast. Your SEO data lives in Looker. Your alerts go to Slack. Your content calendar runs in Notion or Asana. If AI search data sits in a silo, nobody looks at it until something goes wrong.

An API-first architecture means every data point is available programmatically: technical audit results, AI Readiness Scores, prompt-level AI Visibility results, sentiment, crawler analytics, and competitor mentions. You choose where it goes and how it gets there. Build a custom Slack bot that pings your team when a competitor overtakes you in ChatGPT. Feed visibility scores into your Tableau dashboard alongside organic traffic. Trigger content workflows automatically when scores drop.

This isn't a nice-to-have. For teams that already run on data pipelines, an API-first monitoring tool is the difference between AI search data that gets acted on and data that gets ignored. See our enterprise monitoring guide for the broader organizational framework.

Search Console signal, June 23, 2026

Google Search Console shows this page is already surfacing for developer-shaped demand, but it is not earning clicks yet. Exact URL data from March 25 to June 23, 2026 showed 388 impressions, zero clicks, and a 19.7 average position. The strongest developer rows included 84 impressions for ai search monitoring api, 34 for ai visibility tool with api access so i can pipe metrics into my bi dashboard, 11 forai uptime monitoring api, 5 for ai monitoring api, and 2 forai engine optimization platform quick start presets for ai monitoring and alerts. Those queries are asking for a data contract, not a category definition.

Query PatternWhat the API Must ExposeFoglift Endpoint Surface
AI search monitoring APIPrompt-level mention, position, citation, competitor, and sentiment rows/api/v1/ai-visibility/results
Pipe AI visibility metrics into BIStable JSON that can be flattened into Looker, Metabase, Tableau, Power BI, or a warehouse/api/v1/monitor
Dashboards and alertsWebhooks for scan completion, score movement, visibility changes, and alert triggersDashboard webhook events
Webhook integrations for AI optimization platformsPush events for prompt checks, failed visibility events, competitor gains, and score drops/api/v1/ai-visibility/results + webhook events
Uptime-style AI monitoringTimestamped runs, expected prompt coverage, retry headers, and alertable visibility state/api/v1/monitor + webhooks

Actions Engine signal, June 22, 2026

Foglift's own recommendations payload generated at 19:02 UTC showed 24% AI visibility across 453 analyzed results. The highest-priority gap was best AI search monitoring tool for brands 2026, where Foglift appeared in 0/5 engines and tryprofound.com was the strongest competitor signal with 215 recent mentions. That makes this API page a support page for the comparison and monitoring cluster: it should answer exactly what a developer gets back from an AI search monitoring API.

What you can build with the Foglift API

  • 1. Slack bots that alert on visibility drops or competitor gains
  • 2. BI dashboards (Looker, Metabase, Tableau) with live AI search data
  • 3. Automated content workflows that trigger when AI Readiness Scores fall
  • 4. CI/CD checks that validate AI visibility before shipping content changes
  • 5. Custom reporting for stakeholders who never log in to another tool

Foglift API Overview

The Foglift API is organized around the same surfaces developers use in the product: scans for technical audits, AI Visibility for model fan-out checks across ChatGPT, Perplexity, Claude, Gemini, and Google AI Overview, prompts for tracked query libraries, and monitoring summaries for history, sentiment, competitor movement, and crawler analytics. All public v1 endpoints return JSON and use standard HTTP methods. Full reference at /docs; see the technical documentation optimization guide for making API references easier for AI engines to cite.

API FieldWhy Developers Need ItCommon Downstream Use
promptKeeps the buyer question attached to every engine responseQuery library reporting and content briefs
modelSeparates ChatGPT, Perplexity, Gemini, Claude, and Google AI Overview behaviorEngine-specific dashboards
brand_mentionedShows whether the brand made the answer set for that promptShare-of-voice and uptime-style alerts
citationsCaptures the cited URLs and domains AI engines used as evidenceSource-layer gap analysis and digital PR targets
competitorsIdentifies who won the answer when your brand did notCompetitive alerts and comparison-page prioritization
sentimentAdds the tone of the mention alongside the binary appearanceBrand-safety monitoring

Dashboard-Ready Data Contract

The Search Console query ai visibility tool with api access so i can pipe metrics into my bi dashboard is the clearest statement of intent on this URL. A useful API should return rows that are already stable enough for a warehouse table. Nested dashboard payloads create extra reverse-engineering work. At minimum, keep these fields in your sync.

Dashboard MetricRequired API FieldsWhy It Matters
Visibility rateprompt, model, brand_mentioned, created_atShows the share of tracked answers where the brand appears.
Citation sharecitations[].url, citations[].domain, modelSeparates brand mentions from source citations that can send traffic.
Competitor share of voicecompetitors[], prompt, modelIdentifies which competitor won the answer when your brand did not.
Sentiment trendsentiment, sentiment_score, response_textPrevents positive and negative mentions from being blended into one count.
Portfolio reportingworkspace_id, brand_id, prompt_group, run_idLets agencies and multi-product teams roll up results without mixing brands.

Authentication

The public technical scan can run without a key, subject to the free per-IP limit. Authenticated requests use API keys that start with sk_fog_. Pass the key as X-API-Key for v1 endpoints, or as Authorization: Bearer sk_fog_... where the docs note Bearer support. Launch, Growth, and Enterprise workspaces can generate keys in the dashboard under Settings or Developer. Multi-brand accounts should pass brand_id when an endpoint needs a workspace.

curl "https://foglift.io/api/v1/scan?url=https://example.com" \
        -H "X-API-Key: sk_fog_your_api_key" \
        -H "Content-Type: application/json"

Technical Scan Endpoint

Run a technical audit and retrieve results programmatically. The audit analyzes SEO health, schema markup, AI Readiness signals, page performance, security headers, accessibility, and AI crawler access.

# Public scan, no key required within the free per-IP allowance
      curl "https://foglift.io/api/v1/scan?url=https://example.com"

      # Authenticated scan, higher plan allowance
      curl "https://foglift.io/api/v1/scan?url=https://example.com" \
        -H "X-API-Key: sk_fog_your_api_key"

      # Batch scan, Launch+ plan
      curl -X POST "https://foglift.io/api/v1/scan/batch" \
        -H "X-API-Key: sk_fog_your_api_key" \
        -H "Content-Type: application/json" \
        -d '{"urls": ["https://example.com", "https://example.com/pricing"]}'

AI Visibility Endpoints

Check how your brand appears across AI search engines. Submit one prompt or an array of prompts, specify which models to query, and get back structured visibility data including citations, sentiment, positions, competitors, and per-model responses. If you omit prompts, Foglift uses the saved prompt library for the requested brand.

# Run one AI Visibility check
      curl -X POST https://foglift.io/api/v1/ai-visibility \
        -H "X-API-Key: sk_fog_your_api_key" \
        -H "Content-Type: application/json" \
        -d '{
          "brand_id": "WS_UUID",
          "prompt": "Best website optimization tools for SaaS companies",
          "domain": "yourbrand.com",
          "models": ["chatgpt", "perplexity", "claude", "gemini"],
          "dry_run": false
        }'

      # Pull recent results for dashboards or warehouse sync
      curl -H "X-API-Key: sk_fog_your_api_key" \
        "https://foglift.io/api/v1/ai-visibility/results?brand_id=WS_UUID&days=30&model=chatgpt&limit=100"

Batch Operations

For prompt libraries, use POST /api/v1/prompts to save up to 50 tracked prompts, then call POST /api/v1/ai-visibility without a prompt body to run the saved set. For page libraries, use the scan batch or sitemap endpoints.

curl -X POST https://foglift.io/api/v1/prompts \
        -H "X-API-Key: sk_fog_your_api_key" \
        -H "Content-Type: application/json" \
        -d '{
          "brand_id": "WS_UUID",
          "prompts": [
            { "text": "Best CRM for startups", "category": "comparison" },
            { "text": "Top project management tools 2026", "category": "industry" },
            { "text": "YourBrand vs CompetitorX", "category": "comparison" }
          ]
        }'

Example: Building a Slack Bot for AI Visibility Alerts

One of the most common integrations is a Slack bot that notifies your team when AI visibility changes. Here's a complete example using Foglift webhooks and a small Node.js server.

Step 1: Register a Webhook

Tell Foglift where to send scan and score events. Webhook registration is managed from the authenticated dashboard because each endpoint belongs to a user account. URLs must use HTTPS.

# Dashboard configuration
      Endpoint URL: https://your-server.com/webhooks/foglift
      Events: scan.completed, score.changed, score.dropped, visibility.changed, alert.triggered

      # The receiver below is plain HTTP, so it works with Express, Next.js,
      # Cloudflare Workers, Fastify, or any framework that can parse JSON.

Step 2: Handle the Webhook and Post to Slack

A minimal Express server that receives Foglift webhook events and forwards them to a Slack channel via the Slack Web API:

import express from "express";

      const app = express();
      app.use(express.json());

      const SLACK_WEBHOOK = process.env.SLACK_WEBHOOK_URL;

      app.post("/webhooks/foglift", async (req, res) => {
        const { event, data } = req.body;

        // Optional: verify a shared secret if your receiver requires one.
        // const isValid = verifySharedSecret(req);

        let message = "";

        if (event === "score.dropped") {
          message = [
            ":chart_with_downwards_trend: *AI Visibility Drop Detected*",
            `Brand: ${data.brand}`,
            `Page or prompt: ${data.target}`,
            `Previous score: ${data.previous_score}`,
            `Current score: ${data.current_score}`,
            `<https://foglift.io/dashboard|View details>`,
          ].join("\n");
        }

        if (event === "visibility.changed") {
          message = [
            ":warning: *AI Visibility Changed*",
            `Prompt: "${data.prompt}"`,
            `Engine: ${data.engine}`,
            `Mentioned: ${data.mentioned ? "yes" : "no"}`,
            `Citation count: ${data.citations?.length ?? 0}`,
          ].join("\n");
        }

        if (message) {
          await fetch(SLACK_WEBHOOK, {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ text: message }),
          });
        }

        res.status(200).json({ received: true });
      });

      app.listen(3001);

That's it. Your team now gets real-time Slack alerts whenever a monitored prompt shows a significant visibility change. No need to check a separate dashboard.

Connecting AI Search Data to Your BI Dashboard

AI search visibility belongs in the same dashboard where your team already tracks organic traffic, paid media performance, and conversion rates. Here's how to connect Foglift data to the most common BI tools.

Looker / Looker Studio

Create a custom data source that pulls from the Foglift API on a schedule. Use the /api/v1/ai-visibility/results endpoint for prompt-level history or /api/v1/monitor for a 7, 14, or 30-day summary.

// Fetch 30-day visibility history for Looker ingestion
      const response = await fetch(
        "https://foglift.io/api/v1/ai-visibility/results?" +
          new URLSearchParams({
            brand_id: "WS_UUID",
            days: "30",
            model: "chatgpt",
            limit: "100",
          }),
        {
          headers: {
            "X-API-Key": "sk_fog_your_api_key",
          },
        }
      );

      const data = await response.json();
      // Flatten the JSON into rows before loading your warehouse or BI source.

Metabase

Metabase supports REST API data sources via its native query interface or through a sync layer. The simplest approach is writing the Foglift data to your Postgres or BigQuery warehouse on a nightly cron, then pointing Metabase at the table. This gives you full SQL access to AI visibility data alongside every other metric you track.

Tableau

Use Tableau's Web Data Connector or its REST API integration to pull Foglift data directly. The JSON response format maps cleanly to Tableau's data model. Build cross-source dashboards that correlate AI citation rate with organic traffic, pipeline stage, or content publish dates to identify what drives AI visibility.

Common BI integrations

  • Data warehouse sync: Nightly pull to Postgres, BigQuery, or Snowflake via cron + API
  • Looker Studio: Custom data connector with CSV or JSON export
  • Tableau: Web Data Connector or direct REST integration
  • Metabase: SQL queries against synced warehouse tables
  • Power BI: REST API connector with scheduled refresh

Webhook-Driven Workflows

Webhooks let you build automated responses to scan and score changes. Instead of polling the API on a schedule, register a webhook and Foglift pushes matching events to your endpoint.

Trigger Content Updates When Scores Drop

The highest-value webhook workflow is automatic content flagging. When an AI Readiness Score drops below a threshold or a monitored visibility event changes, the webhook fires and your system creates a ticket in Jira, Linear, or Asana with the affected URL or prompt, the prior score, the current score, and a link to the evidence.

// Webhook handler: auto-create Linear ticket on visibility drop
      app.post("/webhooks/foglift", async (req, res) => {
        const { event, data } = req.body;

        if (event === "score.dropped" && data.score_change <= -15) {
          await fetch("https://api.linear.app/graphql", {
            method: "POST",
            headers: {
              Authorization: `Bearer ${process.env.LINEAR_API_KEY}`,
              "Content-Type": "application/json",
            },
            body: JSON.stringify({
              query: `mutation {
                issueCreate(input: {
                  teamId: "${process.env.LINEAR_TEAM_ID}",
                  title: "AI visibility drop: ${data.target}",
                  description: "Score dropped ${data.score_change} points.\n\nTarget: ${data.target}\nPrevious score: ${data.previous_score}\nCurrent score: ${data.current_score}\n\n[View in Foglift](https://foglift.io/dashboard)",
                  priority: 2
                }) { issue { id url } }
              }`
            }),
          });
        }

        res.status(200).json({ ok: true });
      });

Available Webhook Events

EventFires WhenUse Case
score.droppedAI Readiness or monitoring score decreases beyond thresholdContent remediation tickets
score.changedScore changes between scans or monitored runsWin tracking, team notifications
visibility.changedPrompt-level AI Visibility changesCitation and competitor alerts
scan.completedTechnical audit finishes processingPipeline triggers, report generation
alert.triggeredA configured product alert firesSlack, Teams, PagerDuty, and ticketing workflows

CLI and MCP for Developer Workflows

Not every workflow needs a webhook or a dashboard. Sometimes you just want to check your AI visibility from the terminal. The Foglift CLI (foglift-scan) wraps the API in a developer-friendly interface that works in scripts, CI/CD pipelines, and interactive sessions.

CLI Quick Start

# Install
      npm install -g foglift-scan

      # Authenticate (env var; generate a key at foglift.io/dashboard/settings)
      export FOGLIFT_API_KEY=sk_fog_your_api_key

      # Scan a single URL (no API key required for the basic scan)
      foglift scan https://example.com
      foglift scan https://example.com --json --threshold=80

      # Run an AI visibility check across engines
      foglift scan ai-check --prompt "best project management tools" \
        --models chatgpt,perplexity,claude,gemini \
        --domain yourbrand.com

      # Pull recent visibility results and sentiment
      foglift scan results --days 7 --model chatgpt --json > results.json
      foglift scan sentiment --days 30 --json

      # Manage tracked prompts
      foglift scan prompts list
      foglift scan prompts add "best tools to rank in ChatGPT"

      # Scan history for a URL
      foglift scan history https://example.com --json

CI/CD Integration

Add an AI Readiness scan to your deployment pipeline so every push is graded against the same eight extraction signals the AI engines care about. --threshold=N returns exit code 1 if the overall score drops below N, which gives you a clean pipeline gate.

# GitHub Actions example
      - name: AI Readiness scan post-deploy
        env:
          FOGLIFT_API_KEY: ${{ secrets.FOGLIFT_API_KEY }}
        run: |
          npm install -g foglift-scan
          # Fail the build if AI Readiness drops below 80
          foglift scan https://example.com --threshold=80

          # Optional: capture structured results for reporting
          foglift scan https://example.com --json > ai-readiness.json
          foglift scan ai-check --prompt "best tools in your category" \
            --models chatgpt,perplexity --domain example.com --json > visibility.json

MCP Server: Foglift Inside Claude, Cursor, and Windsurf

The Foglift MCP server (foglift-mcp) exposes 13 tools to any Model Context Protocol client: 7 read-only tools (scan history, sentiment, prompts, models, AI search monitoring), 5 write tools (scan a URL, batch scan up to 10 URLs, run an AI visibility check, add a prompt, set tracked models), and 1 destructive tool (delete a prompt). Once it's registered, an AI assistant can scan your site, pull visibility results, and run sentiment checks without leaving the chat. The same FOGLIFT_API_KEY drives auth. See the MCP integration comparison for how that agent loop differs from dashboard-only connectors.

The practical agent pattern is broader than a dashboard export. An agent can read prompt-level visibility, inspect cited source URLs, compare recurring competitors, and draft the next action from the same evidence. The canonical workflow lives at foglift.io/for-ai.

# Run on demand (no install)
      npx foglift-mcp

      # Or run as a long-lived HTTP server (for Claude.ai remote MCP)
      npx foglift-mcp --transport http --port 3001

      # Example registration in claude_desktop_config.json
      {
        "mcpServers": {
          "foglift": {
            "command": "npx",
            "args": ["foglift-mcp"],
            "env": { "FOGLIFT_API_KEY": "sk_fog_your_api_key" }
          }
        }
      }

Full tool list and configuration examples live at foglift.io/integrations/mcp. The package is published as foglift-mcp on npm.

Rate Limits, Authentication, and Best Practices

Rate Limits

Rate limits are enforced per endpoint and plan. Rate-limited responses include headers your integration can use for backoff:

X-RateLimit-Limit: 60
      X-RateLimit-Remaining: 47
      X-RateLimit-Reset: 1742662800
PlanTechnical ScansAI Visibility TokensBest Fit
FreePublic scan allowance, 10/day by IPWeekly Google AI Overview automation, plus manual checks any timeFree Technical Audits and quick checks
LaunchDaily monitoring for up to 3 brands4,000/monthFounder and small-team API workflows
GrowthTwice-daily monitoring for up to 10 brands11,500/monthAgencies and multi-product teams
EnterpriseHourly monitoring, high scan limits27,000/monthLarge workspaces and API-heavy workflows

Authentication Best Practices

  • Use separate keys: Create separate API keys for each integration (Slack bot, BI sync, CI pipeline). If one key is compromised, revoke it without disrupting other integrations.
  • Store keys securely: Use environment variables or a secrets manager. Never commit API keys to version control.
  • Rotate regularly: Set a quarterly rotation schedule. The API supports multiple active keys per project to enable zero-downtime rotation.
  • Protect webhook receivers: Store any webhook secret in your secrets manager, validate incoming requests before side effects, and rotate the endpoint if the receiver URL leaks.

Error Handling

The API uses standard HTTP status codes. All error responses include a machine-readable code field and a human-readable message:

// 429 Too Many Requests
      {
        "error": {
          "code": "rate_limit_exceeded",
          "message": "Rate limit exceeded. Retry after 23 seconds.",
          "retry_after": 23
        }
      }

      // Recommended: exponential backoff with jitter
      async function apiCallWithRetry(url, options, maxRetries = 3) {
        for (let i = 0; i < maxRetries; i++) {
          const res = await fetch(url, options);
          if (res.status === 429) {
            const retryAfter = res.headers.get("Retry-After") || 2 ** i;
            const jitter = Math.random() * 1000;
            await new Promise((r) => setTimeout(r, retryAfter * 1000 + jitter));
            continue;
          }
          return res;
        }
        throw new Error("Max retries exceeded");
      }

Pagination

History endpoints accept explicit limits and filters. Use the smallest window that answers the dashboard question, then paginate or repeat by model if you need a complete warehouse sync.

# Recent visibility results, scoped to one brand and model
      curl "https://foglift.io/api/v1/ai-visibility/results?brand_id=WS_UUID&days=30&model=chatgpt&limit=100" \
        -H "X-API-Key: sk_fog_your_api_key"

      # Monitoring summary for a 30-day dashboard window
      curl "https://foglift.io/api/v1/monitor?brand_id=WS_UUID&period=30d" \
        -H "X-API-Key: sk_fog_your_api_key"

Frequently Asked Questions

What is an AI search monitoring API?

An AI search monitoring API is a programmatic way to check whether AI engines mention your brand, which URLs they cite, which competitors appear, and how sentiment changes over time. The practical output should be structured rows that your team can store, alert on, or join to traffic and revenue data. Foglift exposes that layer through AI Visibility results, monitoring summaries, prompts, sentiment, crawler analytics, and Technical Audit endpoints.

Can I pipe AI visibility metrics into my existing BI dashboard?

Yes. The REST API returns technical audit results, AI Readiness Scores, AI Visibility results, prompts, sentiment, crawler analytics, and monitoring summaries as JSON. Connect it to Looker, Metabase, Tableau, Power BI, or any tool that supports REST data sources. Use /api/v1/ai-visibility/results for prompt-level rows and /api/v1/monitor for trend dashboards.

What data should an AI search monitoring API return for BI dashboards?

It should return normalized rows with the prompt, engine, brand mention status, cited URLs, cited domains, competitors, sentiment, timestamp, workspace or brand ID, and run ID. Those fields let you calculate visibility rate, citation share, competitor share of voice, sentiment trend, and source-domain movement in Looker, Metabase, Tableau, Power BI, or a warehouse.

Which AI monitoring API works for dashboards and alerts?

Use the AI Visibility results endpoint for prompt-level mention, citation, competitor, and sentiment rows; the monitor endpoint for 7, 14, or 30-day rollups; and webhook events when a score, scan, or visibility status changes. That combination covers the current Search Console demand for an AI monitoring API that can feed dashboards, warehouse jobs, Slack alerts, and uptime-style visibility checks from the same API surface.

How do I set up real-time alerts when my AI visibility drops?

Register an HTTPS webhook endpoint in the dashboard and subscribe to events such as scan.completed, score.changed, score.dropped, and visibility.changed. Route those payloads to Slack, PagerDuty, Microsoft Teams, Linear, or any HTTP endpoint. See the webhook documentation for setup instructions.

Is there a webhook for custom integrations in AI search optimization platforms?

Yes. Foglift webhooks send scan, score, visibility, and alert events to an HTTPS endpoint you control. That lets a custom integration update Slack, PagerDuty, Linear, Microsoft Teams, a warehouse job, or an internal dashboard as soon as an AI visibility event changes.

Does Foglift have a CLI for developer workflows?

Yes. Install the CLI via npm install -g foglift-scan and run Technical Audits, AI visibility checks, and prompt management directly from the terminal. Authenticate by exporting FOGLIFT_API_KEY. The --threshold=N flag returns exit code 1 when the overall score drops below N, which makes it easy to gate CI/CD pipelines, cron jobs, and scripted workflows on AI Readiness quality.

What are the API rate limits?

The unauthenticated public scan endpoint allows 10 scans per day from a single IP. Authenticated usage follows your plan's daily scan allowance and monthly AI Visibility token allowance. Rate-limited responses include X-RateLimit and Retry-After headers where applicable. See pricing for plan details.

Sources & Further Reading

  1. Gartner, “Predicts 2025: Search Marketing,” Feb 2025: 25% of search volume shifting to AI engines by 2026.
  2. SE Ranking, 2025, 129,000 domains: brand web mentions are the strongest AI citation predictor (35% weight).
  3. Amsive, 2026: 50% of AI citations come from content less than 13 weeks old; AirOps 2026 reports a >3x citation penalty past three months stale.
  4. Dimension Market Research, 2024: GEO market $886M in 2024, projected $7.3B by 2031 at 34% CAGR.
  5. Aggarwal et al., KDD 2024, “Position of the Referenced URL in the LLM Response”: research on AI citation mechanics and source ordering.
  6. Foglift Google Search Console property, exact URL query data for /blog/api-first-ai-monitoring, March 25 to June 23, 2026.
  7. Foglift Actions Engine recommendations payload for workspace 51acb225-0be2-4973-8007-963fe5b94e3b, generated June 22, 2026 at 19:02 UTC.

Start with a Free Technical Audit

See your site's AI Readiness in 30 seconds. Upgrade to Launch when you are ready to use the API for custom dashboards, Slack alerts, and automated workflows with your real data.

Fundamentals: Learn about GEO (Generative Engine Optimization) and AEO (Answer Engine Optimization) (the two frameworks for optimizing your content for AI search engines).

Related reading

Free tool

Check your website's SEO + AI Readiness score

Audit any URL in 30 seconds. See scores for SEO, AI search readiness, performance, security, and accessibility.

Free Website Audit

No signup required. Results in 30 seconds.