Project

List Fanout Search Queries

Changed on

List the fanout queries of a project. The default view returns one row per web search query. The queries, terms and brands views aggregate every fanout source (web search, shopping and synthetic), the numbers the Query fanouts page shows.

post/queries/search

Request

  • Base URL
    https://api.peec.ai/customer/v1
  • URL
    https://api.peec.ai/customer/v1/queries/search
  • 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

view'rows' | 'queries' | 'terms' | 'brands'

rows: one row per web search query a chat issued (default). queries: each distinct fanout query with its occurrences. terms: two-word terms with their occurrences, change against the previous period and share of all fanouts. brands: brands named inside fanout queries, by the chats naming them.

termsstring[]

Only count fanout queries containing at least one of these terms, case-insensitively. In the terms view, report these terms instead of the top two-word terms. Ignored by the rows view.

dimensionsstring[]

Group the aggregated views. queries: prompt_id, topic_id, model_channel_id. terms: model_channel_id and one of date, week (Monday) or month (first day); with no terms given, the ten top terms are broken down. brands takes none.

movement'top' | 'trending' | 'losing' | 'new'

Terms view only, without dimensions. top ranks by occurrences (default). trending and losing need the term in both periods and rank by change. new lists terms absent from the previous period. The previous period is the same number of days ending the day before start_date.

Example request

{
  "project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb",
  "start_date": "2025-09-22",
  "end_date": "2025-09-22",
  "filters": [
    {
      "field": "prompt_id",
      "operator": "in",
      "values": [
        "pr_abc123"
      ]
    }
  ],
  "view": "terms",
  "terms": [
    "project management",
    "pricing"
  ],
  "dimensions": [
    "week",
    "model_channel_id"
  ],
  "movement": "trending"
}

Response

Response for status 200

OR

Example response

{
  "data": [
    {
      "prompt": {
        "id": "pr_93f790de-5b7a-45ee-b782-61103c81f20d"
      },
      "chat": {
        "id": "ch_61184892-36ad-4e1a-8178-3a83608f7711"
      },
      "model": {
        "id": "gpt-4o-search"
      },
      "model_channel": {
        "id": "openai-1"
      },
      "date": "2025-09-17",
      "query": {
        "text": "What is Peec?"
      }
    }
  ],
  "total_count": 42,
  "totalCount": 42
}

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)

    • breaking

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

    • breaking

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

    • breaking

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

    • breaking

      the request property type changed from number to integer (media type: application/json)

    • breaking

      the request property type changed from number to integer (media type: application/x-www-form-urlencoded)

    • breaking

      the request property type changed from number to integer (media type: multipart/form-data)

    • breaking

      the request property type changed from number to integer (media type: application/json)

    • breaking

      the request property type changed from number to integer (media type: application/x-www-form-urlencoded)

    • breaking

      the request property type changed from number to integer (media type: multipart/form-data)

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      the request property's max was set to 9007199254740991.00 (media type: application/json)

    • warning

      the request property's max was set to 9007199254740991.00 (media type: application/x-www-form-urlencoded)

    • warning

      the request property's max was set to 9007199254740991.00 (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

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

    • info

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

    • info

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

    • info

      added subschema #1 subschema #2 to the response body anyOf list for the response status