MentionsAPI Compare API

Head-to-head delta between two brands or two queries.

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 1

POST /v1/compare Head-to-head delta between two brands or two queries #

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-compare-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-compare-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mentions Compare 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: Compare
  description: Head-to-head delta between two brands or two queries.
paths:
  /v1/compare:
    post:
      tags:
      - Compare
      operationId: createCompare
      summary: Head-to-head delta between two brands or two queries
      description: 'Three shapes: {query, brand_a, brand_b}, {query_a, query_b, brand}, or both pairs. Flat 500 credits, prorated when a side fails. The live validator accepts providers and include_branding. It does not read mode or region (those appear on the docs page and are stripped). delta.winner is side_a, side_b, or tie.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompareRequest'
      responses:
        '200':
          description: Per-side mention counts and the delta.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompareResponse'
        '400':
          description: Body failed validation. Provide a query (or query_a and query_b) and a brand (or brand_a and brand_b).
          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: Credit balance is below 500 credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Per-key rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CompareSide:
      type: object
      required:
      - query
      - brand
      - providers
      - mention_count
      - provider_count
      properties:
        query:
          type: string
        brand:
          type: string
        providers:
          type: object
          additionalProperties:
            type: object
            required:
            - mentioned
            - rank
            properties:
              mentioned:
                type: boolean
              rank:
                type: integer
                nullable: true
        mention_count:
          type: integer
        provider_count:
          type: integer
    CompareResponse:
      type: object
      required:
      - request_id
      - side_a
      - side_b
      - delta
      - citations
      - cost_cents
      - balance_after_cents
      properties:
        request_id:
          type: string
        side_a:
          $ref: '#/components/schemas/CompareSide'
        side_b:
          $ref: '#/components/schemas/CompareSide'
        delta:
          type: object
          required:
          - mention_count_diff
          - mention_rate_a
          - mention_rate_b
          - delta_pct
          - winner
          - interpretation
          properties:
            mention_count_diff:
              type: integer
            mention_rate_a:
              type: number
            mention_rate_b:
              type: number
            delta_pct:
              type: number
            winner:
              type: string
              enum:
              - side_a
              - side_b
              - tie
            interpretation:
              type: string
        citations:
          type: array
          items:
            $ref: '#/components/schemas/CompareCitation'
        cost_cents:
          type: integer
        balance_after_cents:
          type: integer
    CompareRequest:
      type: object
      required: []
      description: Provide query or both query_a and query_b, and brand or both brand_a and brand_b.
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 500
        query_a:
          type: string
          minLength: 1
          maxLength: 500
        query_b:
          type: string
          minLength: 1
          maxLength: 500
        brand:
          type: string
          minLength: 1
          maxLength: 120
        brand_a:
          type: string
          minLength: 1
          maxLength: 120
        brand_b:
          type: string
          minLength: 1
          maxLength: 120
        providers:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/PublicProvider'
        include_branding:
          type: boolean
          default: false
    CompareCitation:
      type: object
      required:
      - url
      - title
      properties:
        url:
          type: string
          format: uri
        title:
          type: string
        branding:
          $ref: '#/components/schemas/CitationBranding'
    PublicProvider:
      type: string
      enum:
      - chatgpt
      - claude
      - gemini
      - perplexity
      description: Public provider id used by /v1/check, /v1/discover, and /v1/compare. Legacy /v1/ask still uses ProviderId (openai, anthropic, gemini, perplexity).
    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
    CitationBranding:
      type: object
      properties:
        logo_url:
          type: string
          nullable: true
        primary_color:
          type: string
          nullable: true
        secondary_color:
          type: string
          nullable: true
        og_image:
          type: string
          nullable: true
        site_name:
          type: string
          nullable: true
        fetched_at:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
        request_id:
          type: string
          format: uuid
  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.