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

# Obtener respuestas

Las filas sin procesar por ejecución que hay detrás de cada informe: una fila por respuesta del modelo,
con sus menciones, citas y consultas de búsqueda. Sin agregación.

* **Sin `group_by` / `sort`:** las filas se ordenan por fecha, de la más reciente a la más antigua.
* **`include`** elige qué campos devolver (`response`, `mentions`, `citations`, `search_queries`, `sentiment_claims`, …); omítelo para obtener todos los campos excepto `citation_details`, que debe solicitarse explícitamente.
* `mentions` es una lista plana y sin duplicados, en el orden en que aparecen las entidades en la respuesta.
* `sentiment_claims` enumera las afirmaciones extraídas de la respuesta, cada una con `asset`, `theme`, `claim` y `sentiment` (`positive` o `negative`).
* **Filtros:** campos a nivel de prompt más `analysis_type` (a nivel de prompt: `visibility`·`sentiment`·`factcheck`), y hojas `domain`/`page` de nivel superior: `is` un valor o `in` una lista (coincidencia exacta de la URL citada).

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

<Accordion title="Variante de streaming (SSE) (mismo cuerpo, /stream)">
  `POST /v2/prompts/answers/stream` acepta 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 luego un evento `result` por fila.
  `limit`/`cursor` se ignoran; de forma predeterminada devuelve todo. Pasa
  `max_results` para establecer un límite.

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

  event: result    ← one per row, same shape as data[] above
  data: {"date": "2026-06-19", "model": {"name": "ChatGPT"}, "prompt": "<prompt text>", "mentions": ["Profound", "<string>"], "citations": ["https://example.com/article"]}
  ```
</Accordion>

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "info": {
      "total_results": 27690,
      "count": 10,
      "next_cursor": "Z0FBQUFBQnFQcjNsbDZZaWlzZjR2cXJt...",
      "models": ["ChatGPT", "Google Gemini", "Perplexity", "Claude", "..."],
      "include": [
        "run_id", "date", "model", "topic", "topic_id", "persona", "region",
        "tags", "prompt", "prompt_id", "response", "mentions", "citations",
        "search_queries", "analysis_types", "sentiment_claims"
      ],
      "start_date": "2026-06-18",
      "end_date": "2026-06-19",
      "filter": null
    },
    "data": [
      {
        "run_id": "<uuid>",
        "date": "2026-06-19",
        "model": { "id": "<uuid>", "name": "ChatGPT" },
        "topic": "<string>",
        "topic_id": "<uuid>",
        "region": "United States",
        "persona": null,
        "tags": [],
        "prompt": "<prompt text>",
        "prompt_id": "<uuid>",
        "response": "<full model response text>",
        "mentions": ["Profound", "<string>"],
        "citations": ["https://example.com/article"],
        "search_queries": ["<search query>"],
        "analysis_types": ["visibility"],
        "sentiment_claims": [
          { "asset": "Profound", "theme": "<string>", "claim": "<string>", "sentiment": "positive" }
        ]
      }
      // ...9 more rows (count: 10, total_results: 27690); paginate with next_cursor
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v2/prompts/answers
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/prompts/answers:
    post:
      tags:
        - Prompts
      summary: Query Answers V2
      operationId: query_answers_v2_v2_prompts_answers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnswersV2Query'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswersV2Response'
        '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"),
            )

            prompt = client.prompts.answers_v2(
                category_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                start_date="",
                end_date="",
            )

            print(prompt)
        - 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 prompt = await client.prompts.answersV2({
              category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
              start_date: '',
              end_date: '',
            });

            console.log(prompt);
        - 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
                    .prompts()
                    .answers_v2(AnswersV2Query {
                        category_id: "7c9e6679-7425-40de-944b-e07fc1f90ae7".to_string(),
                        start_date: "".to_string(),
                        end_date: "".to_string(),
                        include: None,
                        filter: None,
                        limit: None,
                        max_results: None,
                        cursor: None,
                    })
                    .send()
                    .await?;

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

                Ok(())
            }
components:
  schemas:
    AnswersV2Query:
      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
        include:
          anyOf:
            - items:
                type: string
                enum:
                  - run_id
                  - date
                  - model
                  - topic
                  - topic_id
                  - persona
                  - region
                  - tags
                  - prompt
                  - prompt_id
                  - response
                  - mentions
                  - citations
                  - citation_details
                  - search_queries
                  - analysis_types
                  - sentiment_claims
              type: array
            - type: 'null'
          title: Include
          description: >-
            Which row fields to return: `run_id`, `date`, `model`, `topic`,
            `topic_id`, `region`, `persona`, `tags`, `prompt`, `prompt_id`,
            `response`, `mentions`, `citations`, `citation_details`,
            `search_queries`, `analysis_types`, `sentiment_claims`. Omit for all
            fields except `citation_details`, which must be requested explicitly
            because it is expensive.
        filter:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
          description: >-
            and/or/not tree over `model`, `topic`, `region`, `persona`,
            `prompt`, `tag`, `analysis_type` (visibility/sentiment/factcheck);
            plus top-level `and` leaves `domain` or `page` (`is` one value, or
            `in` a list). Substring-search the prompt with `{"field": "prompt",
            "op": "contains", "value": "…"}`.
        limit:
          anyOf:
            - type: integer
              maximum: 200
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          description: Page size; default 10, max 200.
        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: AnswersV2Query
    AnswersV2Response:
      properties:
        info:
          $ref: '#/components/schemas/AnswersV2Info'
        data:
          items:
            $ref: '#/components/schemas/AnswerRow'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: AnswersV2Response
    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.
    AnswersV2Info:
      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.
        include:
          items:
            type: string
          type: array
          title: Include
          description: Row fields returned (echoes `include`, or all fields when omitted).
      additionalProperties: true
      type: object
      required:
        - count
        - models
        - start_date
        - end_date
        - include
      title: AnswersV2Info
    AnswerRow:
      properties:
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        model:
          anyOf:
            - $ref: '#/components/schemas/DimensionRef'
            - type: 'null'
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        topic_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Id
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
        persona:
          anyOf:
            - type: string
            - type: 'null'
          title: Persona
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        prompt_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Id
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
        mentions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Mentions
        citations:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Citations
        citation_details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ExecutionCitationDetail'
              type: array
            - type: 'null'
          title: Citation Details
          description: >-
            Citation metadata. `positions` identify citation locations in the
            answer text. Each `groups` entry represents a rendered citation
            pill, including single-source pills; `group_position` is the
            source's position within that pill.
        search_queries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Search Queries
        analysis_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Analysis Types
        sentiment_claims:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Sentiment Claims
      additionalProperties: true
      type: object
      title: AnswerRow
      description: >-
        One answer row. Present fields depend on `include`; `model` is an `{id,
        name}` reference.
    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.
    ExecutionCitationDetail:
      properties:
        url:
          type: string
          title: Url
        clean_url:
          type: string
          title: Clean Url
        title:
          type: string
          title: Title
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        hostname:
          type: string
          title: Hostname
        path:
          type: string
          title: Path
        positions:
          items:
            type: integer
          type: array
          title: Positions
        groups:
          anyOf:
            - items:
                $ref: '#/components/schemas/CitationDetailGroup'
              type: array
            - type: 'null'
          title: Groups
        first_cited_at:
          anyOf:
            - type: string
            - type: 'null'
          title: First Cited At
        citation_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Citation Category
      type: object
      required:
        - url
        - clean_url
        - title
        - hostname
        - path
      title: ExecutionCitationDetail
    CitationDetailGroup:
      properties:
        group_id:
          type: integer
          title: Group Id
        group_position:
          type: integer
          title: Group Position
      type: object
      required:
        - group_id
        - group_position
      title: CitationDetailGroup
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````