> ## 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.

# Visibilidad

Con qué frecuencia aparece tu activo en las respuestas de IA, además de la cuota de voz y la posición
media. Selecciona los activos con `assets`, desglosa los resultados con
`group_by` y lee cada métrica como un campo con nombre en la fila.

* **Métricas:** `visibility_score` (proporción de respuestas en las que apareció el activo), `share_of_voice` (proporción de todas las menciones), `average_position` (posición media cuando se menciona; **cuanto más baja, mejor**).
* **`group_by`:** `date`, `model`, `topic`, `region`, `prompt`, `persona`.
* **Selecciona los activos** con el parámetro `assets` (un nombre, una lista o `{ op, value }`). `scope: "all"` clasifica todos los activos; `"owned"` devuelve solo los tuyos.
* **`sort`** por cualquier métrica solicitada, por ejemplo `{ "field": "visibility_score" }`.

<Note>
  ¿Es la primera vez que usas los informes v2? Consulta [Filtros y conceptos](/es/rest-api/reports/reports-v2-overview) para ver la estructura de solicitud compartida, el árbol de filtros, la agrupación y la paginación.
</Note>

<Accordion title="Variante de streaming (SSE) (mismo cuerpo, /stream)">
  `POST /v2/reports/visibility/stream` recibe el **mismo cuerpo de solicitud** y
  devuelve [Server-Sent Events](https://developer.mozilla.org/docs/Web/API/Server-sent_events):
  un evento `summary` (el bloque `info`) y, a continuación, un evento `result` por fila.
  `limit`/`cursor` se ignoran; de forma predeterminada devuelve todo. Pasa
  `max_results` para limitarlo.

  ```text Response (text/event-stream) theme={null}
  event: summary
  data: { ...the info block... }

  event: result    ← one per row, same shape as data[] above
  data: {"asset": {"name": "Profound", "owned": true}, "rank": 1, "visibility_score": 0.48}
  ```
</Accordion>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tryprofound.com/v2/reports/visibility \
    -H "X-API-Key: <your-api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "category_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "start_date": "2026-06-09",
      "end_date": "2026-06-15"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "info": {
      "total_results": 1,
      "count": 1,
      "next_cursor": null,
      "scope": "owned",
      "models": ["ChatGPT", "Google Gemini", "Perplexity", "Claude", "..."],
      "start_date": "2026-06-09",
      "end_date": "2026-06-15",
      "asset_filter": null,
      "filter": null
    },
    "data": [
      {
        "asset": { "name": "Profound", "owned": true },
        "rank": 1,
        "visibility_score": 0.48,
        "share_of_voice": 0.077,
        "average_position": 2.5
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v2/reports/visibility
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/visibility:
    post:
      tags:
        - Reports
        - Reports
      summary: Query Visibility V2
      operationId: query_visibility_v2_v2_reports_visibility_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VisibilityV2Query'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VisibilityV2Response'
        '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"),
            )

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

            print(report)
        - 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 report = await client.reports.queryVisibility({
              category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
              start_date: '',
              end_date: '',
              interval: 'day',
              scope: 'owned',
            });

            console.log(report);
        - 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()
                    .query_visibility(VisibilityV2Query {
                        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,
                        sort: None,
                        limit: None,
                        max_results: None,
                        cursor: None,
                    })
                    .send()
                    .await?;

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

                Ok(())
            }
components:
  schemas:
    VisibilityV2Query:
      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
              - model
              - topic
              - region
              - prompt
              - persona
          type: array
          title: Group By
        metrics:
          anyOf:
            - items:
                type: string
                enum:
                  - visibility_score
                  - share_of_voice
                  - average_position
              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
            - $ref: '#/components/schemas/EntityFilterClause'
            - type: 'null'
          title: Assets
          description: >-
            A name (`is`), a list (`in`), or {op,value} with op
            `is`/`in`/`not_in`.
        filter:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        sort:
          $ref: >-
            #/components/schemas/app__routes__v2__answer_engine_insights__reports__visibility__SortSpec
        limit:
          anyOf:
            - type: integer
              maximum: 50
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          description: Page size; default 10, max 50.
        max_results:
          anyOf:
            - type: integer
              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: VisibilityV2Query
    VisibilityV2Response:
      properties:
        info:
          $ref: '#/components/schemas/VisibilityV2Info'
        data:
          items:
            $ref: '#/components/schemas/VisibilityRow'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: VisibilityV2Response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EntityFilterClause:
      properties:
        op:
          type: string
          enum:
            - is
            - not_is
            - in
            - not_in
            - contains
            - not_contains
            - matches
            - contains_case_insensitive
            - not_contains_case_insensitive
          title: Op
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
      additionalProperties: false
      type: object
      required:
        - op
        - value
      title: EntityFilterClause
      description: Select/exclude the entity, applied outside the data `filter` tree.
    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.
    app__routes__v2__answer_engine_insights__reports__visibility__SortSpec:
      properties:
        field:
          type: string
          enum:
            - visibility_score
            - share_of_voice
            - average_position
          title: Field
          default: visibility_score
      type: object
      title: SortSpec
    VisibilityV2Info:
      properties:
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
          description: >-
            Total rows matching the query before pagination (null when not
            computed).
        count:
          type: integer
          title: Count
          description: Number of rows returned in `data` for this page.
        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` or `owned`.'
        asset_filter:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                type: string
              type: array
            - type: string
            - type: 'null'
          title: Asset Filter
          description: Echoed `assets` selection (filter clause, name, or list), or null.
      additionalProperties: true
      type: object
      required:
        - count
        - models
        - start_date
        - end_date
        - scope
      title: VisibilityV2Info
    VisibilityRow:
      properties:
        asset:
          anyOf:
            - $ref: '#/components/schemas/AssetRef'
            - type: 'null'
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
          description: Asset rank (only when not grouped).
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        model:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        topic:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        region:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        prompt:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        persona:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        visibility_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Visibility Score
        share_of_voice:
          anyOf:
            - type: number
            - type: 'null'
          title: Share Of Voice
        average_position:
          anyOf:
            - type: number
            - type: 'null'
          title: Average Position
      additionalProperties: true
      type: object
      title: VisibilityRow
      description: >-
        One (asset x group) row. Group dimensions and 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
    AssetRef:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        owned:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Owned
          description: Whether the asset is owned by the category.
      type: object
      title: AssetRef
    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

````