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

# Get sites linking to a competitor

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Sites that link to a rival and not to this app, strongest first. Limited to 60 requests per minute per app across all the research endpoints; responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, and a `429` carries `Retry-After`. Paid lookups also draw on a weekly per-app budget (`429 quota_exceeded` once it is used up).



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/seo/research/backlink-gap
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/seo/research/backlink-gap:
    get:
      summary: Get sites linking to a competitor
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Sites that link to a rival and not to this app, strongest first. Limited
        to 60 requests per minute per app across all the research endpoints;
        responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and
        `X-RateLimit-Reset`, and a `429` carries `Retry-After`. Paid lookups
        also draw on a weekly per-app budget (`429 quota_exceeded` once it is
        used up).
      operationId: get_backlink_gap_api_apps__app_id__seo_research_backlink_gap_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app.
            title: App Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
        - name: rival
          in: query
          required: true
          schema:
            type: string
            description: Competitor domain, e.g. example.com.
            title: Rival
          description: Competitor domain, e.g. example.com.
      responses:
        '200':
          description: Sites linking to the rival and not to this app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BacklinkGap'
              example:
                you: pixelboxd.com
                rival: backloggd.com
                sites_linking_to_rival_not_you:
                  - domain: reddit.com
                    rank: 900
                    backlinks: 42
                total: 120
                cost_usd: 0.02
        '400':
          description: '`invalid_request`: a parameter is empty or malformed.'
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: Pass a keyword.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '402':
          description: >-
            `insufficient_credits`: a live lookup is charged to the workspace's
            credits, and it has too few.
          content:
            application/json:
              examples:
                insufficient_credits:
                  summary: insufficient_credits
                  value:
                    error:
                      code: insufficient_credits
                      message: Not enough credits
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '403':
          description: >-
            `engine_not_allowed`: the workspace's AI model settings block every
            engine asked.
          content:
            application/json:
              examples:
                engine_not_allowed:
                  summary: engine_not_allowed
                  value:
                    error:
                      code: engine_not_allowed
                      message: >-
                        This workspace's AI model settings block every engine
                        asked; pick another engine.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: >-
            `not_found`: the app doesn't exist, or SEO research isn't enabled
            for it.
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    error:
                      code: not_found
                      message: Not found
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '409':
          description: >-
            `not_set_up`: the app has no domain or search data source to look up
            yet.
          content:
            application/json:
              examples:
                not_set_up:
                  summary: not_set_up
                  value:
                    error:
                      code: not_set_up
                      message: This app has no domain to compare yet.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '422':
          description: >-
            `invalid_request`: a required parameter is missing or the wrong
            type, or out of range. `error.details.errors` lists each problem.
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: Invalid request
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: >-
            `rate_limited` (request limit) or `quota_exceeded` (the app's lookup
            budget); both carry `Retry-After`.
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: quota_exceeded
                  value:
                    error:
                      code: quota_exceeded
                      message: >-
                        This app's live SEO lookups are used up for now; they
                        reset within a week.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - read_only
components:
  schemas:
    BacklinkGap:
      properties:
        you:
          type: string
          title: You
          description: The app's domain.
          example: pixelboxd.com
        rival:
          type: string
          title: Rival
          description: The rival's domain.
          example: backloggd.com
        sites_linking_to_rival_not_you:
          items:
            $ref: '#/components/schemas/LinkingSite'
          type: array
          title: Sites Linking To Rival Not You
          description: >-
            Up to 20 sites that link to the rival and not to the app, strongest
            first.
          example:
            - backlinks: 42
              domain: reddit.com
              rank: 900
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: Such sites in total, or `null` when unknown.
          example: 120
        cost_usd:
          type: number
          title: Cost Usd
          description: What the lookup cost in US dollars. A cached answer costs `0`.
          example: 0.01
      type: object
      required:
        - you
        - rival
        - sites_linking_to_rival_not_you
        - total
        - cost_usd
      title: BacklinkGap
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    LinkingSite:
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
          description: The linking site, or `null`.
          example: reddit.com
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
          description: Its authority, higher is stronger, or `null`.
          example: 900
        backlinks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Backlinks
          description: Links from it to the rival, or `null`.
          example: 42
      type: object
      required:
        - domain
        - rank
        - backlinks
      title: LinkingSite
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

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