---
title: "Get GA4 AI-referral visitors"
method: GET
path: "/api/mcp/projects/{projectId}/ga4/ai-referrals"
tags: ["GA4"]
---

# Get GA4 AI-referral visitors

`GET /api/mcp/projects/{projectId}/ga4/ai-referrals`

Per-LLM-host AI Source Visitors from GA4 (ChatGPT, Copilot, Gemini, Perplexity, DeepSeek, …): weekly visitor series + week-over-week delta + total. Use this for AI-referral attribution. `weeks` defaults to 12, max 52. Returns 409 ga4_not_connected if no GA4 property is linked.

## Path parameters

- `projectId` string, uuid, required

## Query parameters

- `weeks` integer

## Response `200`

AI-referral visitors by host.

- Ga4AiReferralsResponse
  - `weeks` integer, required
  - `window` Ga4Window, required
    - `from` string, required
    - `to` string, required
  - `metric` 'visitors', required
  - `hosts` object[], required
    - `host` string
    - `total` integer
    - `weekly` object[]
      - `weekStart` string
      - `visitors` integer
      - `partial` boolean
    - `wow` object, nullable
      - `current` number
      - `previous` number
      - `delta` number
      - `deltaPct` number, nullable
  - `totalVisitors` integer, required
  - `success` boolean, required — Always `true` — injected on every success response by this endpoint family's response wrapper.

## Other responses

- `401` — Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `403` — Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `404` — Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `409` — Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `429` — Rate limited. Usually the per-API-key REST limit (600 requests/minute); on Google-backed endpoints it can also relay an upstream Google rate limit. `Retry-After` (seconds) is present when the limit was applied by Searchable's own rate limiter; it may be absent when an upstream provider rate-limits.
- `504` — Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.

---

[API](https://skmtc.net/searchable/apis/searchable-rest-api.md) · [All operations](https://skmtc.net/searchable/apis/searchable-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/searchable/searchable-rest-api/revisions/301b04e800ed/schema)
