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

# Keyword gap versus the competitor last compared in Clarity

> Stored SE Ranking comparison against the competitor last selected in Clarity's Keyword Gap widget. Returns keywords the competitor ranks for where the dealer is missing or ranks lower, ordered by opportunity. Read-only; it never starts a new comparison. connected is false until a competitor has been compared in Clarity.



## OpenAPI

````yaml /openapi.yaml get /analytics/seo/keyword-gap
openapi: 3.1.0
info:
  title: Hrizn Public API
  version: 1.2.0
  description: >
    The Hrizn Public API allows partners to programmatically create content,
    manage inventory descriptions, and integrate with the Hrizn platform.


    All endpoints are prefixed with `/public` and require an API key passed via
    the `X-API-Key` header (except the health check).
  contact:
    email: support@hrizn.io
servers:
  - url: https://api.app.hrizn.io/v1/public
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Analytics
    description: >-
      Warehoused Google Search Console and GA4 reads (Teams+ API access,
      analytics:read). URL Inspection is live only on pages/performance.
  - name: IdeaClouds
    description: Create and manage AI-powered keyword research
  - name: Content Intelligence
    description: AI-powered content gap analysis and recommendations
  - name: Content
    description: Generate content from IdeaClouds
  - name: Compliance
    description: Run OEM compliance checks on content
  - name: Content Tools
    description: Generate SEO metadata, schemas, and social snippets
  - name: Inventory
    description: Access vehicle data and AI descriptions
  - name: Images
    description: >-
      Media Library images. Read the library (images:read): list and fetch
      images with alt text, AI-written title/caption/description, the generating
      prompt, dimensions, article links, and social variant cuts. Generate
      (images:write): async AI image generation returning an image_id;
      completion is delivered via image.generation.completed /
      image.generation.failed webhooks.
  - name: Market
    description: >-
      Live local market listings, days supply, competitive set, and pricing
      insights (Unlimited plan + market_data:read)
  - name: Site
    description: View dealership details and configuration
  - name: Webhooks
    description: Manage webhook subscriptions for real-time events
  - name: Reference
    description: Look up available types, scopes, and events
  - name: Social
    description: >-
      Social Hub posting and reviews across all connected platforms (X,
      Facebook, Instagram, LinkedIn, Google Business Profile)
  - name: Health
    description: Health check (no authentication)
  - name: Share
    description: >-
      Anonymous share-page routes (no API key). Called by Hrizn share pages
      (/s/{publicId}) on behalf of shoppers who are not signed in. Requests must
      originate from the Hrizn app origin (CORS is origin-checked, never
      wildcard) and are rate limited per client IP. Responses use a flat `{
      error }` / `{ success }` body, not the `{ error: { code, message } }`
      envelope of API-key routes.
paths:
  /analytics/seo/keyword-gap:
    get:
      tags:
        - Analytics
      summary: Keyword gap versus the competitor last compared in Clarity
      description: >-
        Stored SE Ranking comparison against the competitor last selected in
        Clarity's Keyword Gap widget. Returns keywords the competitor ranks for
        where the dealer is missing or ranks lower, ordered by opportunity.
        Read-only; it never starts a new comparison. connected is false until a
        competitor has been compared in Clarity.
      operationId: getKeywordGap
      parameters:
        - name: limit
          in: query
          required: false
          description: Maximum keywords to return (1-100, default 25).
          schema:
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          $ref: '#/components/responses/AnalyticsSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanUpgradeRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    AnalyticsSuccess:
      description: Analytics payload
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                additionalProperties: true
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PlanUpgradeRequired:
      description: Plan entitlement required (API_ACCESS or GOOGLE_SERVICES)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: API key lacks required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: 'keyword: Required'
            details:
              type: object
            request_id:
              type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Hrizn API key (prefix hzk_)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.