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

# Query document

> Queries a PubMed article with a user-provided question.

Args:
    request (QueryRequest): An object containing the PubMed ID and the query.

Returns:
    dict: A dictionary containing the result of the query.

Raises:
    HTTPException: If the PubMed ID is invalid, the article is not found, or the query fails.



## OpenAPI

````yaml POST /query
openapi: 3.1.0
info:
  title: AItrika API
  description: AItrika API
  version: 0.1.0
servers: []
security: []
paths:
  /query:
    post:
      summary: Query a PubMed article
      description: |-
        Queries a PubMed article with a user-provided question.

        Args:
            request (QueryRequest): An object containing the PubMed ID and the query.

        Returns:
            dict: A dictionary containing the result of the query.

        Raises:
            HTTPException: If the PubMed ID is invalid, the article is not found, or the query fails.
      operationId: query_document_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
        required: true
      responses:
        '200':
          description: Query result retrieved successfully
          content:
            application/json:
              schema: {}
        '422':
          description: Invalid PubMed ID or query provided
components:
  schemas:
    QueryRequest:
      properties:
        pubmed_id:
          type: integer
          title: Pubmed Id
        query:
          type: string
          title: Query
      type: object
      required:
        - pubmed_id
        - query
      title: QueryRequest

````