MentionsAPI Ask API

Legacy multi-provider LLM queries. Still mounted; new integrations should use Check.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /v1/ask Legacy multi-provider LLM query #
GET /v1/ask/{id} Retrieve a past legacy Ask response #

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/mentionsapi-com:mentionsapi-com-ask-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mentionsapi-com-ask-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mentions Ask API
  version: 1.0.0
  description: Unified API for tracking brand mentions across ChatGPT, Claude, Gemini, Perplexity, and live AI search surfaces (Google AI Overviews, AI Mode, Bing Copilot). The primary call is POST /v1/check. POST /v1/ask remains mounted for existing integrations. Built for GEO tool builders, SEO agencies, and brand monitoring teams.
  contact:
    name: MentionsAPI Support
    email: hello@mentionsapi.com
    url: https://mentionsapi.com/docs
  license:
    name: Proprietary
    url: https://mentionsapi.com/legal/terms
servers:
- url: https://api.mentionsapi.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Ask
  description: Legacy multi-provider LLM queries. Still mounted; new integrations should use Check.
paths:
  /v1/ask:
    post:
      tags:
      - Ask
      operationId: createAsk
      deprecated: true
      summary: Legacy multi-provider LLM query
      description: 'Legacy. Still mounted for back-compat; new integrations should use POST /v1/check. Fans out a single prompt to ChatGPT, Claude, Gemini, and Perplexity (or a subset), deduplicates citations, extracts brand mentions, and returns one normalized payload. Cache tiers (l1/l2/l3) are automatic; the `cache_scope` parameter controls whether the response can be shared across accounts. Set `async: true` with a `webhook_id` to defer execution and receive the result via webhook. Set `mode: "standard"` for cheaper 15-minute asynchronous delivery polled via GET /v1/ask/{id}.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
      responses:
        '200':
          description: Synchronous response — at least one provider returned content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
        '202':
          description: Async or standard-mode request queued. Poll `GET /v1/ask/{id}` or wait for the webhook delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskQueuedResponse'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits to fulfill the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Per-key rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/ask/{id}:
    get:
      tags:
      - Ask
      operationId: getAskById
      deprecated: true
      summary: Retrieve a past legacy Ask response
      description: Legacy companion to POST /v1/ask. Fetches a previously executed Ask response by request id. Responses are retained for 30 days. Returns 202 while async or standard-mode jobs are still processing and 410 once the retention window has expired.
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Request id returned by POST /v1/ask.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Response available — either succeeded (full payload) or failed (error detail).
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/AskResponse'
                - $ref: '#/components/schemas/AskFailedResponse'
        '202':
          description: Request is still queued or processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskPendingResponse'
        '400':
          description: Invalid id parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No Ask with this id exists for the calling account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '410':
          description: Archive retention expired (responses are kept for 30 days).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JsonSchemaSpec:
      type: object
      required:
      - name
      - schema
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
        schema:
          type: object
          additionalProperties: true
        strict:
          type: boolean
    ChatMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
        content:
          type: string
          minLength: 1
          maxLength: 20000
    AskFailedResponse:
      type: object
      required:
      - request_id
      - id
      - status
      - error
      properties:
        request_id:
          type: string
          format: uuid
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - failed
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
        request_id:
          type: string
          format: uuid
    ProviderResult:
      type: object
      required:
      - provider
      - model
      - content
      - citations
      - tokens
      - latency_ms
      properties:
        provider:
          $ref: '#/components/schemas/ProviderId'
        model:
          type: string
          example: gpt-4o-2024-08-06
        content:
          type: string
        citations:
          type: array
          items:
            $ref: '#/components/schemas/Citation'
        tokens:
          $ref: '#/components/schemas/TokenUsage'
        latency_ms:
          type: integer
          minimum: 0
    AggregatedCitation:
      type: object
      required:
      - canonical_url
      - domains
      - providers_cited
      properties:
        canonical_url:
          type: string
          format: uri
        domains:
          type: array
          items:
            type: string
        providers_cited:
          type: array
          items:
            $ref: '#/components/schemas/ProviderId'
        title:
          type: string
    AskResponse:
      type: object
      required:
      - request_id
      - id
      - cached
      - cache_tier
      - providers
      - brand_mentions
      - citations
      - usage
      properties:
        request_id:
          type: string
          format: uuid
        id:
          type: string
          format: uuid
        cached:
          type: boolean
        cache_tier:
          type: string
          enum:
          - l1
          - l2
          - l3
          - miss
        providers:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/ProviderResult'
            - $ref: '#/components/schemas/ProviderError'
        brand_mentions:
          type: array
          items:
            $ref: '#/components/schemas/BrandMention'
        citations:
          type: array
          items:
            $ref: '#/components/schemas/AggregatedCitation'
        usage:
          $ref: '#/components/schemas/AskUsage'
    BrandMention:
      type: object
      required:
      - brand
      - provider
      - rank
      - sentiment
      - context
      properties:
        brand:
          type: string
        provider:
          $ref: '#/components/schemas/ProviderId'
        rank:
          type: integer
          minimum: 1
          description: 1-indexed position of the first mention inside the provider response.
        sentiment:
          type: string
          enum:
          - positive
          - neutral
          - negative
        context:
          type: string
    ErrorObject:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          example: insufficient_credits
        message:
          type: string
          example: Insufficient credits. Subscribe or top up at https://mentionsapi.com/app/billing
        balance_cents:
          type: integer
        required_cents:
          type: integer
    AskUsage:
      type: object
      required:
      - billable_units
      - latency_ms
      properties:
        billable_units:
          type: integer
          minimum: 0
        latency_ms:
          type: integer
          minimum: 0
        cost_cents:
          type: integer
          minimum: 0
    AskPendingResponse:
      type: object
      required:
      - request_id
      - id
      - status
      properties:
        request_id:
          type: string
          format: uuid
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - queued
          - processing
    ProviderError:
      type: object
      required:
      - provider
      - error
      properties:
        provider:
          $ref: '#/components/schemas/ProviderId'
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: provider_timeout
            message:
              type: string
    TokenUsage:
      type: object
      required:
      - input
      - output
      properties:
        input:
          type: integer
          minimum: 0
        output:
          type: integer
          minimum: 0
        reasoning:
          type: integer
          minimum: 0
    AskQueuedResponse:
      type: object
      required:
      - request_id
      - ask_id
      - status
      properties:
        request_id:
          type: string
          format: uuid
        ask_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - queued
        mode:
          type: string
          enum:
          - standard
        poll_url:
          type: string
        estimated_cost_cents:
          type: integer
          minimum: 0
        price_label:
          type: string
    ProviderId:
      type: string
      enum:
      - openai
      - anthropic
      - gemini
      - perplexity
      description: The LLM provider that produced a result.
    Citation:
      type: object
      required:
      - url
      properties:
        url:
          type: string
          format: uri
        title:
          type: string
        snippet:
          type: string
    AskRequest:
      type: object
      description: Exactly one of `prompt` or `messages` must be provided.
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: Legacy single-turn prompt.
        messages:
          type: array
          minItems: 1
          maxItems: 50
          items:
            $ref: '#/components/schemas/ChatMessage'
          description: Multi-turn conversation. Each provider proxy supports turn arrays natively.
        system_message:
          type: string
          minLength: 1
          maxLength: 20000
          description: Top-level system message. Ignored if `messages` contains a system turn.
        providers:
          type: array
          minItems: 1
          maxItems: 4
          items:
            $ref: '#/components/schemas/ProviderId'
        model:
          type: object
          description: Per-provider model override. Each value must be on the proxy allowlist.
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 100
        params:
          type: object
          properties:
            temperature:
              type: number
              minimum: 0
              maximum: 2
            max_tokens:
              type: integer
              minimum: 1
              maximum: 8000
        json_schema:
          $ref: '#/components/schemas/JsonSchemaSpec'
        cache_scope:
          type: string
          enum:
          - shared
          - private
          default: shared
          description: '`shared` allows cache hits across accounts; `private` namespaces by account.'
        track_brands:
          type: array
          maxItems: 10
          items:
            type: string
            minLength: 1
            maxLength: 80
        web_search:
          type: boolean
          default: true
        country:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2 country code.
        async:
          type: boolean
          description: When true, the call is deferred to a queue and delivered to `webhook_id`.
        webhook_id:
          type: string
          format: uuid
          description: 'Required when `async: true`. Identifies the webhook endpoint that receives the ask.completed event.'
        mode:
          type: string
          enum:
          - live
          - standard
          default: live
          description: '`live` = synchronous. `standard` = async delivery within 15 min, 30% cheaper.'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Send your API key as ''Authorization: Bearer <token>''. Create and manage keys in your dashboard.'
    sessionJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase session JWT for the logged-in dashboard user. Used by /v1/keys, /v1/webhooks, /v1/monitors, and /v1/stripe/*. Not an API key.