miso.ai Ask APIs API

Miso's new Ask API is the next generation of question answering APIs. It is designed to provide accurate and concise answers to your questions based on your existing product documents. Ask API offers a seamless and effective way to address complex queries in a near-realtime fasion. Miso preprocesses your product documents, breaking them into segments. When a question is received, Miso finds the most related product and segments, then summarize to a concise and informative answer based on the identified segments, including products related to the question. Possible use case includes: knowledge base, documentation search, customer support, and more. To use the Ask API, you first submit a "question" you want to ask. Question can be any human-readable text. Then a question ID will returned, and the question will be processed in the background. After receving question ID, you can then use the question ID to get latest answer to the question as it is being compiled. ---- For example: If you want to know about the inner workings of nginx: ```json { "question":"How nginx works internally?" } ``` The API would response with a question id. ```json { "data": { "question_id": "ff4775fa-345e-4d28-91b0-8fb8bf095e6a" }, "message": "success" } ``` Then you can send a GET request to `/v1/ask/questions/{question_id}/answer` to get the latest answer as it is being compiled and summerized. You can use `answer_stage` and `finished` to check current answer status. Here's the response of answer API when data is fetched and being verified, before answer is summerized: ```json { "message": "success", "data": { "question": "How nginx works internally?", "question_id": "ff4775fa-345e-4d28-91b0-8fb8bf095e6a", "parent_question_id": null, "answer_stage": "Verifying possible answers", "finished": false, "answer": "Verifying possible answers ...", "sources": [], "related_resources": [], "followup_questions": [] } } ``` Here's the response when answer is fullly summerized: ```json { "message": "success", "data": { "question": "How nginx works internally?", "question_id": "ff4775fa-345e-4d28-91b0-8fb8bf095e6a", "parent_question_id": null, "answer_stage": "Generating summary", "finished": true, "answer": "# How does Nginx work internally?\n\n## Internal requests [1]\n\nNginx differentiates between external and internal requests. External requests...[omitted for simplicity]", "sources": [ { "title": "Internal requests", "product_id": "9781788623551", "child_title": "Internal requests", "child_id": "203", "snippet": "<mark>Internal requests\nNginx differentiates external and internal requests.</mark>" }, { "title": "5. Nginx Core Architecture", "product_id": "9781484216569", "child_title": "5. Nginx Core Architecture", "child_id": "5", "snippet": "Checks if the client can access of the requested the resource.\n<mark>It is at this step that Nginx...[omitted]</mark>" }, { "title": "2. Managing Nginx", "product_id": "9781785289538", "child_title": "2. Managing Nginx", "child_id": "14", "snippet": "<mark>The Nginx connection processing architecture\nBefore you study...[omitted]</mark>" }, { "title": "3. Nginx Core Directives", "product_id": "9781484216569", "child_title": "3. Nginx Core Directives", "child_id": "3", "snippet": "<mark>Understanding the Default Configuration\nThe default configuration...[omitted]</mark>" }, { "title": "4. Nginx Modules", "product_id": "9781484216569", "child_title": "4. Nginx Modules", "child_id": "4", "snippet": "<mark>Based on the context like HTTP, MAIL, and STREAM, it creates a ...[omitted]</mark>" } ], "related_resources": [], "followup_questions": [ "What are the steps involved in processing a request and generating a response in Nginx?", "How do Nginx modules contribute to the internal workings of Nginx?" ] } } ``` Related product IDs will be returned along with human-readable answer. Related text section in the product will also be quoted. If a product has any children, they will also be matched, `child_id` and `child_title` will be included for sources belonging to the product's children. You can use `fq` to limit the search scope, for example, to a specific product type or other condition. If you only want to search for books (no articles of videos), you can use `fq=type:book` like this: ```json { "question":"How nginx works internally?" "fq": "type:book" } ``` If you want the answer to contain any other fields, set `source_fl` when submitting the question.

Operations 2

POST /v1/ask/questions Create a new question #
GET /v1/ask/questions/{question_id}/answer Get latest answer of asked question #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/misoai:misoai-ask-apis-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

misoai-ask-apis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Miso Ask APIs API
  description: '# Overview

    Miso’s approach to personalization is to train machine learning Engines on three core data sets:


    1.'
  version: 1.1.4
servers:
- url: https://api.askmiso.com
tags:
- name: Ask APIs
  description: Miso's new Ask API is the next generation of question answering APIs.
paths:
  /v1/ask/questions:
    post:
      tags:
      - Ask APIs
      summary: Create a new question
      description: 'This API is used to submit questions to Miso.


        After a question is submitted, a `question_id` is returned.

        Then you can use `question_id` to check the latest status of it''s answer

        as it is being compiled.'
      operationId: questions_v1_ask_questions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Secret API Key: []
  /v1/ask/questions/{question_id}/answer:
    get:
      tags:
      - Ask APIs
      summary: Get latest answer of asked question
      description: 'This API is used to fetch the latest answer of previous submitted question from Miso


        A submitted question is put into a job with following stage:


        - Initialization

        - Parsing and fecthing related content

        - Relevance checking

        - Summarization


        This API will tell you at what stage current question is in.

        If answer is fetched and being summerized, it will also return the latest summarization result.


        Besides human readable answer, the products used to generate answer are also returned.'
      operationId: questions_answer_v1_ask_questions__question_id__answer_get
      parameters:
      - required: true
        schema:
          title: Question Id
          type: string
          format: uuid
        name: question_id
        in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PollAnswerResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Secret API Key: []
components:
  schemas:
    QuestionRequest:
      title: QuestionRequest
      required:
      - question
      type: object
      properties:
        user_id:
          title: User Id
          type: string
          description: The user who made the query. For an anonymous visitor, use `anonymous_id` instead.
        anonymous_id:
          title: Anonymous Id
          type: string
          description: The anonymous visitor who made this query.
        user_hash:
          title: User Hash
          type: string
          description: 'The hash of `user_id` (or `anonymous_id`) encrypted by your Secret API Key.

            `user_hash` is used to prevent unauthorized API access if you are making API calls with a Publishable API Key

            '
        user_type:
          title: User Type
          enum:
          - anonymous
          - registered
          - subscriber
          - free
          - paid
          description: The type of user who made the query, used for rate limiting.
        fq:
          title: Fq
          type: string
          description: '


            Defines a query in Solr syntax that can be used to restrict the superset of

            products to return, without influencing the overall ranking. `fq` can enable users to drill down to products

            with specific features based on different product attributes


            For example, the query below limits the search results to only show products whose size is either `M` or `S` and

            brand is `Nike`:


            ```

            {"fq": "size:(\"M\" OR \"S\") AND brand:\"Nike\""}

            ```


            You can use `fq` to apply filters against your custom attributes as well. For example, the query below limits the

            search results to only products whose `designer` attribute is `Calvin Klein`


            ```

            {"fq": "attributes.designer:\"Calvin Klein\""}

            ```


            `fq` can also limit search results by numerical range. For example, the following query limits the results to

            products that have `rating >= 4`.


            ```

            {"fq": "rating:[4 TO *]"}

            ```

            '
        question:
          title: Question
          type: string
          description: The question for which an answer is requested.
        parent_question_id:
          title: Parent Question Id
          type: string
          description: The UUID of the parent question if the current question is a follow-up to a previous question.
          format: uuid
        yearly_decay:
          title: Yearly Decay
          type: number
          description: The yearly decay rate for the answer score.
        source_fl:
          title: Source Fl
          type: array
          items:
            type: string
          description: "\nA list of fields to be returned for the `sources`. Any fields in uploaded product can be assigned, including fields in `custom_attributes`.\n\nIf specificed field does not exist, that field will not be included in the result.\nIf you use different schema for `custom_attributes` across different products, it is possible that not all returned sources has the some fields.\n\nFor example, if you include `published_at` and `custom_attributes` in `source_fl`:\n\n```json\n{\n    \"question\":\"Explain Python GIL\",\n    \"source_fl\":[\"published_at\", \"custom_attributes.rating\"]\n}\n```\n\nThe answer will contain `published_at` field for each source:\n\n```json\n{\n    \"message\": \"success\",\n    \"data\": {\n        \"question\": \"Explain Python GIL\",\n        \"question_id\": \"57aeb083-b943-43b1-86ab-b6108788dd50\",\n        \"parent_question_id\": null,\n        \"answer_stage\": \"Generating summary\",\n        \"finished\": true,\n        \"answer\": \"# Explain Python GIL\\n\\n## Why do we need the GIL? [1]\\n\\nThe GIL is currently an essential part of the CPython...[omitted for simplicity]\",\n        \"sources\": [\n            {\n                \"published_at\": \"2022-05-20T00:00:00+00:00\",\n                \"custom_attributes\": {\n                    \"rating\": 4.7\n                },\n                \"product_id\": \"9781800207721\",\n                \"title\": \"Multiprocessing – When a Single CPU Core Is Not Enough\",\n                \"child_title\": \"Multiprocessing – When a Single CPU Core Is Not Enough\",\n                \"child_id\": \"16\",\n                \"snippet\": \"Remember the segmentation faults we saw in Chapter 11, ...[omitted]\"\n            },\n            {\n                \"published_at\": \"2015-02-26T00:00:00+00:00\",\n                \"custom_attributes\": {\n                    \"rating\": 4.3\n                },\n                \"product_id\": \"9780134034416\",\n                \"title\": \"5. Concurrency and Parallelism\",\n                \"child_title\": \"5. Concurrency and Parallelism\",\n                \"child_id\": \"12\",\n                \"snippet\": \"&lt;mark&gt;Click here to view code image\\n...[omitted]&lt;/mark&gt;\"\n            },\n            {\n                \"published_at\": \"2020-04-30T00:00:00+00:00\",\n                \"custom_attributes\": {\n                    \"rating\": 3.5\n                },\n                \"product_id\": \"9781492055013\",\n                \"title\": \"1. Understanding Performant Python\",\n                \"child_title\": \"1. Understanding Performant Python\",\n                \"child_id\": \"2\",\n                \"snippet\": \"&lt;mark&gt;Although it still locks Python into running ...[omitted]&lt;/mark&gt;\"\n            },\n            {\n                \"published_at\": \"2019-11-15T00:00:00+00:00\",\n                \"custom_attributes\": {\n                    \"rating\": 4.2\n                },\n                \"product_id\": \"9780134854717\",\n                \"title\": \"7. Concurrency and Parallelism\",\n                \"child_title\": \"7. Concurrency and Parallelism\",\n                \"child_id\": \"16\",\n                \"snippet\": \"&lt;mark&gt;Although Python supports multiple threads of execution...[omitted]&lt;/mark&gt;\"\n            }\n        ],\n        \"related_resources\": []\n    }\n}\n```\n\n"
          default:
          - title
        related_resource_fl:
          title: Related Resource Fl
          type: array
          items:
            type: string
          description: 'A list of fields to be returned for the `related_resources`. Example: `[''title'', ''url'']`.'
          default:
          - title
        boost_fq:
          title: Boost Fq
          type: string
          description: "\nDefines a query in Solr syntax that can be used to boost a subset of products to the top of the ranking.\nFor example, the query below will promote all the relevant products whose brand is `Nike` to the top of\nrecommendation list:\n\n```\n{\n    \"boost_fq\": \"brand:\\\"Nike\\\"\"\n}\n```\n\nFor a slightly more complex example, the query below will promote the Nike products which have also been tagged\nas `ON SALE` to the top of the ranking:\n```\n{\n   \"boost_fq\": \"brand:\\\"Nike\\\" AND tags:\\\"ON SALE\\\"\"\n}\n```\nIt is worth mentioning that, Miso will only boost products that are relevant,\nand will not boost a low performance product only because it matches the boosting query.\n"
        cite_start:
          title: Cite Start
          type: string
          description: 'The citation start marker. Example: `[` or `{`'
        cite_end:
          title: Cite End
          type: string
          description: 'The citation end marker. Example: `]` or `}`'
    QuestionResponse:
      title: QuestionResponse
      required:
      - data
      type: object
      properties:
        data:
          title: Data
          allOf:
          - $ref: '#/components/schemas/QuestionResponseData'
          description: Question response data.
        message:
          title: Message
          type: string
          description: Human-readable message.
          default: success
    ValidationError:
      title: ValidationError
      required:
      - loc
      - msg
      - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            type: string
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    QuestionResponseData:
      title: QuestionResponseData
      required:
      - question_id
      type: object
      properties:
        question_id:
          title: Question Id
          type: string
          description: The UUID for the submitted question.
          format: uuid
    AnswerData:
      title: AnswerData
      required:
      - question
      - question_id
      type: object
      properties:
        question:
          title: Question
          type: string
          description: The question given by the user
        question_id:
          title: Question Id
          type: string
          description: The UUID of the question for which the latest answer is requested.
          format: uuid
        parent_question_id:
          title: Parent Question Id
          type: string
          description: The UUID of the parent question if the current question is a follow-up to a previous question.
          format: uuid
        answer_stage:
          title: Answer Stage
          type: string
          description: The status of the answer generating process.
          default: ''
        finished:
          title: Finished
          type: boolean
          description: Whether the answer generating process is finished.
          default: false
        finish_reason:
          title: Finish Reason
          enum:
          - not_finished
          - success
          - error
          - forbidden
          description: The reason why the answer generating process is finished.
          default: not_finished
        answer:
          title: Answer
          type: string
          description: The latest answer for the given question.
          default: ''
        sources:
          title: Sources
          type: array
          items:
            type: object
          description: A list of sources related to the answer.
          default: []
        related_resources:
          title: Related Resources
          type: array
          items:
            type: object
          description: A list of related resources relevant to the question and answer.
          default: []
        followup_questions:
          title: Followup Questions
          type: array
          items:
            type: string
          description: A list of suggested follow-up questions.
        affiliation_products:
          title: Affiliation Products
          type: array
          items:
            type: object
          description: A list of suggested affiliation products.
        revision:
          title: Revision
          type: integer
          description: The revision number of the answer response data. Updated answer data has larger revision number, used by the SDK to check data order.
          default: 0
    PollAnswerResponse:
      title: PollAnswerResponse
      required:
      - data
      type: object
      properties:
        message:
          title: Message
          type: string
          description: The status of the API response ('success' or other human readable api status).
          default: success
        data:
          title: Data
          allOf:
          - $ref: '#/components/schemas/AnswerData'
          description: The answer data containing the latest answer, sources, and related resources.
  securitySchemes:
    Secret_API_Key:
      type: apiKey
      description: "\nYour secret API key is used to access every Miso API endpoint. You should secure this key and only use it on a backend \nserver. Never leave this key in your client-side JavaScript code. If the private key is compromised, you can revoke it \nin [Dojo](https://dojo.askmiso.com/docs/api-browser) and get a new one.\n\nSpecify your secret key in the `api_key` query parameter. For example:\n```\nPOST /v1/users?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17\n```\n\n"
      in: query
      name: api_key
    Publishable_API_Key:
      type: apiKey
      description: "\nYour publishable API key is used to call Miso's APIs from your front-end code. It can be used to stream interactions from the browser using Miso's Interactions Upload API or to access read-only search and recommendation results for a given user. When using the publishable API key, the requested user_id will need to be hashed to maintain the necessary security compliance. \n\nSpecify your publishable key in the `api_key` query parameter. For example:\n```\nPOST /v1/interactions?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17\n```\n"
      in: query
      name: api_key
x-tagGroups:
- name: Data APIs
  tags:
  - Interaction APIs
  - Product / Content APIs
  - User APIs
- name: Engine APIs
  tags:
  - Search APIs
  - Ask APIs
  - Bulk API
  - User Recommendations
  - Product Recommendations
- name: Experiment APIs
  tags:
  - Experiment APIs
- name: Q&A APIs
  tags:
  - Q&A APIs