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

# Get Search Console performance data

> Returns clicks, impressions, CTR, and average position from Google Search Console for your connected property.

**Requires:** Google Search Console connected from the RankSpot dashboard (Integrations → Google Search Console).

**Dimensions:** Group results by `query` (search terms), `page` (landing pages), `country`, `device`, or `searchAppearance`. Combine up to 3 dimensions in a single request.

**Date range:** Use ISO dates (`YYYY-MM-DD`). Data is available with ~2-3 day delay. Maximum range: 16 months.



## OpenAPI

````yaml https://api.rankspot.ai/docs-json post /v1/gsc/performance
openapi: 3.0.0
info:
  title: RankSpot Public API
  description: >-
    The RankSpot Public API gives you programmatic access to your workspace data
    — keywords, backlinks, competitors, content topics, articles, and more.


    ## Authentication


    All endpoints require a Bearer API key in the `Authorization` header:


    ```

    Authorization: Bearer <your-api-key>

    ```


    Generate API keys from **Settings → API Keys** in the RankSpot dashboard.
    Each key is scoped to a single workspace.


    ## Pagination


    List endpoints return a consistent envelope:


    ```json

    {
      "data": {
        "total": 120,
        "offset": 0,
        "limit": 20,
        "count": 20,
        "items": [...]
      }
    }

    ```


    Use `offset` and `limit` query parameters to paginate. Default limit is
    **20**, maximum is **100**.


    ## Status codes


    | Code | Meaning |

    |------|---------|

    | 200  | Success |

    | 201  | Created |

    | 204  | No content (delete / unarchive) |

    | 400  | Validation error or business rule violation |

    | 401  | Missing or invalid API key |

    | 404  | Resource not found or belongs to another workspace |
  version: '1.0'
  contact: {}
servers:
  - url: https://api.rankspot.ai
    description: Production
security: []
tags:
  - name: Articles
    description: >-
      AI-generated blog articles. Articles are created automatically when a
      topic is sent to generation — they cannot be created directly via the API.
  - name: Backlinks
    description: >-
      Backlinks discovered for your domain and your competitors' domains.
      Backlinks are auto-synced on a background interval and cannot be created
      via the API.
  - name: Categories
    description: Categories for organising topics and articles within your workspace.
  - name: Competitors
    description: >-
      Competitor domains tracked in your workspace. Once added, keywords and
      backlinks for each competitor are fetched asynchronously on a background
      sync interval.
  - name: Forum Opportunities
    description: >-
      Forum threads and community posts surfaced as potential link-building or
      engagement opportunities.
  - name: Keywords
    description: >-
      SEO keywords tracked in your workspace, enriched with search volume,
      competition, and AI-generated relevance scores.
  - name: People Also Ask
    description: >-
      "People also ask" questions discovered from search results for your
      tracked keywords.
  - name: Topics
    description: >-
      Content topic ideas that can be turned into articles. Create topics
      manually or let RankSpot generate them from your keyword clusters.
  - name: Search Console
    description: >-
      Google Search Console performance data — clicks, impressions, CTR, and
      average position for your connected property. Requires GSC to be connected
      from the RankSpot dashboard.
paths:
  /v1/gsc/performance:
    post:
      tags:
        - Search Console
      summary: Get Search Console performance data
      description: >-
        Returns clicks, impressions, CTR, and average position from Google
        Search Console for your connected property.


        **Requires:** Google Search Console connected from the RankSpot
        dashboard (Integrations → Google Search Console).


        **Dimensions:** Group results by `query` (search terms), `page` (landing
        pages), `country`, `device`, or `searchAppearance`. Combine up to 3
        dimensions in a single request.


        **Date range:** Use ISO dates (`YYYY-MM-DD`). Data is available with
        ~2-3 day delay. Maximum range: 16 months.
      operationId: GscController_getPerformance
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GscPerformanceDto'
      responses:
        '200':
          description: Performance data from Google Search Console
          content:
            application/json:
              schema:
                example:
                  siteUrl: https://example.com/
                  startDate: '2026-01-01'
                  endDate: '2026-01-31'
                  dimensions:
                    - query
                  rows:
                    - keys:
                        - rankspot seo tool
                      clicks: 120
                      impressions: 980
                      ctr: 12.24
                      position: 3.2
                    - keys:
                        - seo keyword tracker
                      clicks: 85
                      impressions: 1200
                      ctr: 7.08
                      position: 5.6
      security:
        - bearer: []
components:
  schemas:
    GscPerformanceDto:
      type: object
      properties:
        startDate:
          type: string
          example: '2024-01-01'
          description: Start date in YYYY-MM-DD format
        endDate:
          type: string
          example: '2024-01-31'
          description: End date in YYYY-MM-DD format
        dimensions:
          type: array
          description: >-
            Dimensions to group by. Pass multiple times for combined grouping
            (e.g. query + page).
          items:
            type: string
            enum:
              - query
              - page
              - country
              - device
              - date
              - searchAppearance
          example:
            - query
        dimensionFilterGroups:
          description: >-
            Filter groups to narrow results. Filters within a group are ANDed
            together.
          type: array
          items:
            $ref: '#/components/schemas/GscDimensionFilterGroupDto'
        startRow:
          type: number
          description: >-
            Zero-based index of the first row to return. Use with rowLimit for
            pagination.
          example: 0
        rowLimit:
          type: number
          description: >-
            Max rows to return (1–25000). Defaults to GSC API default (1000)
            when omitted.
      required:
        - startDate
        - endDate
    GscDimensionFilterGroupDto:
      type: object
      properties:
        filters:
          type: array
          items:
            $ref: '#/components/schemas/GscDimensionFilterDto'
      required:
        - filters
    GscDimensionFilterDto:
      type: object
      properties:
        dimension:
          type: string
          enum:
            - country
            - device
            - page
            - query
            - searchAppearance
          example: country
        expression:
          type: string
          example: ind
          description: >-
            Value to match against. Country codes are ISO 3166-1 alpha-3 (e.g.
            ind, usa). Device values: DESKTOP, MOBILE, TABLET.
        operator:
          type: string
          enum:
            - equals
            - notEquals
            - contains
            - notContains
            - includingRegex
            - excludingRegex
          default: equals
      required:
        - dimension
        - expression
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````