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

# Marcas

Este informe muestra la visibilidad de las marcas en los resultados de compras
de ChatGPT. Indica con qué frecuencia aparece cada marca, su posición promedio
y su clasificación. Selecciona las marcas con `assets`. Divide los resultados
con `group_by`. Cada métrica es un campo con nombre en la fila.

* **Métricas:** `visibility_score` (la proporción de resultados de compras que incluyen la marca); `average_position` (la clasificación promedio cuando aparece la marca; un número **más bajo** es **mejor**); `visibility_rank`.
* **`group_by`:** `date`, `topic`, `region` o `prompt`.
* **Selección de marcas:** selecciona las marcas con el parámetro `assets`. Indica un nombre o una lista. `scope: "all"` clasifica todas las marcas. `scope: "owned"` (el valor predeterminado) devuelve solo tus marcas. Una selección con `assets` devuelve una sola página e ignora `limit`.
* **Campos de filtro:** `topic`, `region`, `persona`, `prompt`, `tag`.

<Note>
  Los datos de compras provienen solo de ChatGPT. Ningún informe de compras
  tiene un group\_by de `model` ni un filtro de `model`.
</Note>

<Note>
  Los informes v2 comparten una misma forma de solicitud. Para conocer el árbol
  de filtros, la agrupación y la paginación, consulta [Filtrado y conceptos](/es/rest-api/reports/reports-v2-overview).
</Note>

<Accordion title="Variante con streaming (SSE) (mismo cuerpo, /stream)">
  `POST /v2/reports/shopping/brands/stream` usa el **mismo cuerpo de solicitud**.
  Devuelve [Server-Sent Events](https://developer.mozilla.org/docs/Web/API/Server-sent_events):
  un evento `summary` (el bloque `info`) y luego un evento `result` por cada fila.
  El stream rechaza `limit` y `cursor`. Devuelve todas las filas de forma
  predeterminada. Para establecer un máximo, usa `max_results` (máximo 50000).
  Usa el stream para obtener un resultado grande en una sola solicitud.
</Accordion>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tryprofound.com/v2/reports/shopping/brands \
    -H "X-API-Key: <your-api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "category_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "group_by": ["date"],
      "metrics": ["visibility_score", "average_position", "visibility_rank"],
      "scope": "owned",
      "limit": 10
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "info": {
      "total_results": 1,
      "count": 1,
      "next_cursor": null,
      "scope": "owned",
      "assets": null,
      "models": ["ChatGPT"],
      "metrics": ["visibility_score", "average_position", "visibility_rank"],
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "filter": null
    },
    "data": [
      {
        "asset": { "name": "Example Brand", "owned": true },
        "date": "2026-06-01",
        "visibility_score": 0.42,
        "average_position": 3.2,
        "visibility_rank": 1
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v2/reports/shopping/brands
openapi: 3.1.0
info:
  title: External API
  version: 0.60.2
  x-scalar-sdk-installation:
    - lang: Python
      description: |-
        ```sh
        pip install profound
        ```
    - lang: TypeScript
      description: |-
        ```sh
        npm install @profoundai/client
        ```
    - lang: Rust
      description: |-
        ```sh
        cargo add profound
        ```
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security:
  - APIKeyHeader:
      - X-API-Key
  - BearerAuth: []
paths:
  /v2/reports/shopping/brands:
    post:
      tags:
        - Reports
        - Reports
      summary: Query Shopping Brands V2
      operationId: query_shopping_brands_v2_v2_reports_shopping_brands_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShoppingBrandsV2Query'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShoppingBrandsV2Response'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - label: Python
          lang: Python
          source: |-
            import os

            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),
            )

            shopping = client.reports.shopping.brands(
                category_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                start_date="",
                end_date="",
                interval="day",
                scope="owned",
            )

            print(shopping)
        - label: TypeScript
          lang: TypeScript
          source: |-
            import Profound from '@profoundai/client';

            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
              environment: 'production',
            });

            const shopping = await client.reports.shopping.brands({
              category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
              start_date: '',
              end_date: '',
              interval: 'day',
              scope: 'owned',
            });

            console.log(shopping);
        - label: rust
          lang: rust
          source: |-
            use profound::*;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let client = ProfoundClient::builder()
                    .api_key(std::env::var("PROFOUND_API_KEY")?)
                    .build()?;

                let response = client
                    .reports()
                    .shopping()
                    .brands(ShoppingBrandsV2Query {
                        category_id: "7c9e6679-7425-40de-944b-e07fc1f90ae7".to_string(),
                        start_date: "".to_string(),
                        end_date: "".to_string(),
                        group_by: None,
                        metrics: None,
                        interval: None,
                        scope: None,
                        assets: None,
                        filter: None,
                        limit: None,
                        max_results: None,
                        cursor: None,
                    })
                    .send()
                    .await?;

                println!("{:?}", response);

                Ok(())
            }
components:
  schemas:
    ShoppingBrandsV2Query:
      properties:
        category_id:
          type: string
          format: uuid
          title: Category Id
        start_date:
          type: string
          title: Start Date
          description: YYYY-MM-DD, ET, inclusive
        end_date:
          type: string
          title: End Date
          description: YYYY-MM-DD, ET, inclusive
        group_by:
          items:
            type: string
            enum:
              - date
              - topic
              - region
              - prompt
          type: array
          title: Group By
        metrics:
          anyOf:
            - items:
                type: string
                enum:
                  - visibility_score
                  - average_position
                  - visibility_rank
              type: array
            - type: 'null'
          title: Metrics
        interval:
          type: string
          enum:
            - day
            - week
            - month
          title: Interval
          default: day
        scope:
          type: string
          enum:
            - owned
            - all
          title: Scope
          default: owned
        assets:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Assets
          description: Restrict to these asset names (a name or list). Overrides `scope`.
        filter:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        limit:
          anyOf:
            - type: integer
              maximum: 50
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          description: Page size for scope=all; default 10, max 50.
        max_results:
          anyOf:
            - type: integer
              maximum: 50000
              exclusiveMinimum: 0
            - type: 'null'
          title: Max Results
          description: >-
            Stream endpoint only: cap the number of streamed rows (default:
            all).
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
      additionalProperties: false
      type: object
      required:
        - category_id
        - start_date
        - end_date
      title: ShoppingBrandsV2Query
    ShoppingBrandsV2Response:
      properties:
        info:
          $ref: '#/components/schemas/ShoppingBrandsV2Info'
        data:
          items:
            $ref: '#/components/schemas/ShoppingBrandRow'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: ShoppingBrandsV2Response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FilterNode:
      properties:
        and:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: And
        or:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: Or
        not:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        op:
          anyOf:
            - type: string
            - type: 'null'
          title: Op
        value:
          title: Value
      additionalProperties: false
      type: object
      title: FilterNode
      description: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
    ShoppingBrandsV2Info:
      properties:
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
          description: Total assets matching the query before pagination.
        count:
          type: integer
          title: Count
          description: >-
            Number of assets on this page. When grouped by `date`, `data` holds
            one row per asset x bucket, so `len(data)` can exceed `count`.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Opaque cursor for the next page; null on the last page.
        models:
          items:
            type: string
          type: array
          title: Models
          description: Display names of the models the report covers.
        start_date:
          type: string
          title: Start Date
          description: Echoed request start date (YYYY-MM-DD, ET).
        end_date:
          type: string
          title: End Date
          description: Echoed request end date (YYYY-MM-DD, ET).
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
          description: Echoed normalized filter tree, or null when no filter was sent.
        scope:
          type: string
          title: Scope
          description: 'Asset scope: `all`, `owned`, or `custom` when `assets` was given.'
        assets:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Assets
          description: Echoed `assets` selection; when set it overrides `scope`.
        metrics:
          items:
            type: string
          type: array
          title: Metrics
          description: Metrics returned per row.
      additionalProperties: true
      type: object
      required:
        - count
        - models
        - start_date
        - end_date
        - scope
        - metrics
      title: ShoppingBrandsV2Info
    ShoppingBrandRow:
      properties:
        asset:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Asset
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
          description: Asset visibility rank as a top-level field (ungrouped only).
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        topic:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        region:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        prompt:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        visibility_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Visibility Score
        average_position:
          anyOf:
            - type: number
            - type: 'null'
          title: Average Position
        visibility_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Visibility Rank
          description: Asset visibility rank (present on grouped rows).
      additionalProperties: true
      type: object
      title: ShoppingBrandRow
      description: >-
        One (asset x group) row. Group dims/metrics present depend on
        `group_by`/`metrics`.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DimensionRef:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      title: DimensionRef
      description: An ``{id, name}`` reference for a grouped dimension value.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````