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

# Query app

> Query an app

<RequestExample>
  ```bash Request theme={null}
  curl --request POST \
    --url http://localhost:8080/{app_id}/query \
    -d "query=who is Elon Musk?"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  { "response": "Net worth of Elon Musk is $218 Billion." }
  ```
</ResponseExample>


## OpenAPI

````yaml post /{app_id}/query
openapi: 3.1.0
info:
  title: Embedchain REST API
  description: This is the REST API for Embedchain.
  license:
    name: Apache 2.0
    url: https://github.com/embedchain/embedchain/blob/main/LICENSE
  version: 0.0.1
servers: []
security: []
paths:
  /{app_id}/query:
    post:
      tags:
        - Apps
      summary: Query app
      description: Query an app
      operationId: query_an_app__app_id__query_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryApp'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    QueryApp:
      properties:
        query:
          type: string
          title: Query
          description: The query that you want to ask the App.
          default: ''
      type: object
      title: QueryApp
      example:
        query: Who is Elon Musk?
    DefaultResponse:
      properties:
        response:
          type: string
          title: Response
      type: object
      required:
        - response
      title: DefaultResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````