Reports

Get Links Report

Changed on

Get a report on the domains AI answers linked to in their own text. A link is a URL the answer wrote into its prose; it is never one of the sources the answer retrieved or cited, which the domains report covers.

Prompt Scope

The report covers every prompt in the project that has not been deleted, archived prompts included, so history stays intact after a prompt is archived. Use a prompt_id filter to narrow it.

Aggregation Formulas

When aggregating results across multiple rows/dimensions:

  • linked_percentage: sum(linked_chat_count) / sum(total_chat_count), only across rows that do not split the same chats (not across url rows of one domain).
  • average_link_position is not additive across rows. Request the coarser breakdown instead.
post/reports/links

Request

  • Base URL
    https://api.peec.ai/customer/v1
  • URL
    https://api.peec.ai/customer/v1/reports/links
  • Auth
    • API key in header X-API-Key
    • or API key in query parameter api_key
    • or HTTP bearer

Query parameters

project_idstring

Required if using a company api key

Example:or_f45b94ba-5e35-4982-93ed-285e72ee14eb

Request body

project_idstring

Required if using a company api key

limitinteger
offsetinteger
start_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

end_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

dimensionsstring[]

Dimensions to break down the report by. url breaks each linked domain down into the pages linked.

Example request

{
  "project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb",
  "start_date": "2025-09-22",
  "end_date": "2025-09-22",
  "dimensions": [
    "prompt_id"
  ],
  "filters": [
    {
      "field": "model_channel_id",
      "operator": "in",
      "values": [
        "openai-0"
      ]
    }
  ],
  "order_by": [
    {
      "field": "linked_chat_count",
      "direction": "desc"
    }
  ]
}

Response

Success

Example response

{
  "data": [
    {
      "domain": "acme.com",
      "url": "https://acme.com/pricing",
      "classification": "COMPETITOR",
      "prompt": {
        "id": "pr_93f790de-5b7a-45ee-b782-61103c81f20d"
      },
      "model": {
        "id": "gpt-4o-search"
      },
      "model_channel": {
        "id": "openai-1"
      },
      "tag": {
        "id": "tg_23abec5b-100a-4261-9ee7-1effe68f0149"
      },
      "topic": {
        "id": "to_e6b8cdd3-a51b-4d94-a866-28dbe6b830a6"
      },
      "country_code": "US",
      "chat": {
        "id": "ch_abc123"
      },
      "week": "2025-03-10",
      "month": "2025-03-01",
      "linked_chat_count": 18,
      "linked_percentage": 0.6,
      "link_count": 24,
      "average_link_position": 1.4,
      "total_chat_count": 30
    }
  ]
}

Changes

    • breaking

      removed subschema #1 subschema #2 from the / request property anyOf list (media type: application/json)

    • breaking

      removed subschema #1 subschema #2 from the / request property anyOf list (media type: application/x-www-form-urlencoded)

    • breaking

      removed subschema #1 subschema #2 from the / request property anyOf list (media type: multipart/form-data)

    • info

      added subschema #1 subschema #2 to the / request property anyOf list (media type: application/json)

    • info

      added subschema #1 subschema #2 to the / request property anyOf list (media type: application/x-www-form-urlencoded)

    • info

      added subschema #1 subschema #2 to the / request property anyOf list (media type: multipart/form-data)

    • info

      endpoint added