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

# Get the referral report

> Returns the sessions of the site by source (AI assistants, organic search and paid search) and the conversions. Use `date_range` to select the period (`7g`, `1a`, `3a`, `6a`, `1y` or `custom` with `since` and `until`). Use `compare` to select the comparison period (`previous`, `previous_year` or `custom` with `compare_since` and `compare_until`).



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sites/{site_uuid}/search-performance/referrals
openapi: 3.0.3
info:
  title: Perquery API
  version: 1.0.0
  description: Read-only access to the data of your Perquery organization.
servers:
  - url: https://perquery.ai/api
security:
  - apiKey: []
paths:
  /v1/sites/{site_uuid}/search-performance/referrals:
    get:
      tags:
        - Search performance
      summary: Get the referral report
      description: >-
        Returns the sessions of the site by source (AI assistants, organic
        search and paid search) and the conversions. Use `date_range` to select
        the period (`7g`, `1a`, `3a`, `6a`, `1y` or `custom` with `since` and
        `until`). Use `compare` to select the comparison period (`previous`,
        `previous_year` or `custom` with `compare_since` and `compare_until`).
      operationId: referral_report
      parameters:
        - in: query
          name: compare
          schema:
            enum:
              - previous
              - previous_year
              - custom
            type: string
            default: previous
            minLength: 1
          description: |-
            * `previous` - previous
            * `previous_year` - previous_year
            * `custom` - custom
        - in: query
          name: compare_since
          schema:
            type: string
            format: date
          description: The first day of a `custom` comparison.
        - in: query
          name: compare_until
          schema:
            type: string
            format: date
          description: The last day of a `custom` comparison.
        - in: query
          name: date_range
          schema:
            enum:
              - 7g
              - 1a
              - 3a
              - 6a
              - 1y
              - custom
            type: string
            default: 1a
            minLength: 1
          description: |-
            * `7g` - 7g
            * `1a` - 1a
            * `3a` - 3a
            * `6a` - 6a
            * `1y` - 1y
            * `custom` - custom
        - in: query
          name: since
          schema:
            type: string
            format: date
          description: The first day of a `custom` range.
        - in: path
          name: site_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: until
          schema:
            type: string
            format: date
          description: The last day of a `custom` range.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralResponse'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    ReferralResponse:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/ReferralLineResponse'
        conversions:
          type: array
          items:
            $ref: '#/components/schemas/ConversionRowResponse'
        currency:
          type: string
      required:
        - conversions
        - currency
        - lines
    ReferralLineResponse:
      type: object
      properties:
        source:
          type: string
        sessions:
          type: integer
        delta:
          type: number
          format: double
          nullable: true
        points:
          type: array
          items:
            $ref: '#/components/schemas/ReferralPointResponse'
      required:
        - delta
        - points
        - sessions
        - source
    ConversionRowResponse:
      type: object
      properties:
        source:
          type: string
        kind:
          $ref: '#/components/schemas/ReferralKind'
        sessions:
          type: integer
        conversions:
          type: integer
        value:
          type: number
          format: double
        currency:
          type: string
        conversion_rate:
          type: number
          format: double
        baseline_multiple:
          type: number
          format: double
          nullable: true
      required:
        - baseline_multiple
        - conversion_rate
        - conversions
        - currency
        - kind
        - sessions
        - source
        - value
    ReferralPointResponse:
      type: object
      properties:
        day:
          type: string
          format: date
        sessions:
          type: integer
      required:
        - day
        - sessions
    ReferralKind:
      enum:
        - ai
        - organic
        - paid
      type: string
      description: |-
        * `ai` - ai
        * `organic` - organic
        * `paid` - paid
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: '`ApiKey pq_<prefix>_<secret>`. An API key gives read-only access.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.