> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwairy.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Source Domain Evolution

> Track how a source's citation metrics change over time

Track how a source's citation metrics change over time. Returns daily time-series data for mentions and average position.

### Path Parameters

<ParamField path="brandId" type="string" required>
  The unique identifier of the brand
</ParamField>

<ParamField path="sourceId" type="string" required>
  The unique identifier of the source
</ParamField>

### Query Parameters

<ParamField query="period" type="number">
  Number of days to include. If not specified, returns all data.
</ParamField>

<ParamField query="startDate" type="string">
  Start date (ISO 8601 format)
</ParamField>

<ParamField query="endDate" type="string">
  End date (ISO 8601 format)
</ParamField>

<ParamField query="provider" type="string">
  Filter by AI provider. Supports comma-separated multi-select (e.g., `chatgpt,claude`).
</ParamField>

<ParamField query="topic" type="string">
  Filter by topic ID. Supports comma-separated multi-select (e.g., `id1,id2`).
</ParamField>

<ParamField query="tag" type="string">
  Filter by tag ID. Supports comma-separated multi-select (e.g., `id1,id2`).
</ParamField>

### Example Request

```bash theme={null}
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/source-domains/src1/evolution?period=7" \
  -H "Authorization: Bearer qw-api-your-token-here"
```

### Example Response

```json theme={null}
{
  "success": true,
  "source": {
    "id": "src1",
    "domain": "industry-news.com",
    "isSelf": false
  },
  "evolution": [
    {
      "date": "2024-12-01",
      "mentions": 5,
      "avgPosition": 3.1
    },
    {
      "date": "2024-12-02",
      "mentions": 8,
      "avgPosition": 2.9
    }
  ]
}
```

### Error Responses

| Status | Code               | Description                           |
| ------ | ------------------ | ------------------------------------- |
| 401    | `INVALID_TOKEN`    | Authentication failed                 |
| 404    | `BRAND_NOT_FOUND`  | Brand doesn't exist or not accessible |
| 404    | `SOURCE_NOT_FOUND` | Source doesn't exist                  |
