# Compare gained and lost AI citations across two dates

**Use case:** 

Compare two synthetic answer snapshots. See gained and lost citations, brand changes and source evidence; mismatched or failed observations stay unmeasured.

## Input

```json
{
  "snapshots": [
    {
      "query": "best appointment software",
      "surface": "synthetic_demo",
      "country": "IN",
      "language": "en",
      "device": "desktop",
      "observedAt": "2026-11-02T10:00:00Z",
      "text": "Acme and Rival offer appointment tools. Acme provides online scheduling.",
      "sources": [
        {
          "url": "https://acme.example/scheduling",
          "title": "Acme scheduling"
        }
      ]
    }
  ],
  "brands": [
    {
      "name": "Acme",
      "aliases": [
        "Acme"
      ],
      "domains": [
        "acme.example"
      ]
    },
    {
      "name": "Rival",
      "aliases": [
        "Rival"
      ],
      "domains": [
        "rival.example"
      ]
    }
  ],
  "maxSnapshots": 5,
  "datasetSurface": "supplied_answer",
  "baselineSnapshots": [
    {
      "query": "best appointment software",
      "surface": "synthetic_demo",
      "country": "IN",
      "language": "en",
      "device": "desktop",
      "observedAt": "2026-11-01T10:00:00Z",
      "text": "Rival offers appointment tools for clinics.",
      "sources": [
        {
          "url": "https://rival.example/product",
          "title": "Rival"
        }
      ]
    }
  ]
}
```

## Output

```json
{
  "query": {
    "label": "Query",
    "format": "text"
  },
  "surface": {
    "label": "Surface",
    "format": "text"
  },
  "country": {
    "label": "Country",
    "format": "text"
  },
  "language": {
    "label": "Language",
    "format": "text"
  },
  "observedAt": {
    "label": "Observedat",
    "format": "text"
  },
  "billable": {
    "label": "Billable",
    "format": "boolean"
  },
  "comparable": {
    "label": "Comparable",
    "format": "boolean"
  },
  "reason": {
    "label": "Reason",
    "format": "text"
  },
  "baselineAt": {
    "label": "Baselineat",
    "format": "text"
  },
  "answer_changed": {
    "label": "Answer changed",
    "format": "boolean"
  },
  "gained_domains": {
    "label": "Gained domains",
    "format": "array"
  },
  "lost_domains": {
    "label": "Lost domains",
    "format": "array"
  },
  "gained_urls": {
    "label": "Gained urls",
    "format": "array"
  },
  "lost_urls": {
    "label": "Lost urls",
    "format": "array"
  },
  "brand_changes": {
    "label": "Brand changes",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The AEO Citation Change Tracker - Gained and Lost Sources Actor is ready to run with the inputs already set for "Compare gained and lost AI citations across two dates". [Sign up or log in](https://console.apify.com/create-task-from-example/L3D5JxiBXP9Wm9z1S) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Compare gained and lost AI citations across two dates" task

The AEO Citation Change Tracker - Gained and Lost Sources Actor will start running based on the input automatically. You can also change all the input fields, like current answer snapshots, brands and competitors, and more, to match your specific use case.

### 3. Receive the "Compare gained and lost AI citations across two dates" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as query, surface, country, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Compare gained and lost AI citations across two dates" task via API](https://apify.com/variable_mitts/aeo-citation-change-tracker.md).

## About this Actor

This example demonstrates how to use [AEO Citation Change Tracker - Gained and Lost Sources](https://apify.com/variable_mitts/aeo-citation-change-tracker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/variable_mitts/aeo-citation-change-tracker.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/variable_mitts/aeo-citation-change-tracker.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
