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

# Search interest over time

> One of only two live-on-request features, with SERP. Trends are about what is happening now, so they are cached for six hours rather than a day.



## OpenAPI

````yaml https://api.surnex.io/docs/openapi.json get /v1/trends/explore
openapi: 3.1.0
info:
  title: Surnex API
  version: 1.0.0
  description: >-
    The SEO platform's API.


    **The API is the product.** The dashboard is one client and the MCP server
    at `/mcp` is another. If a number needs deriving, a service derives it —
    never a React component, or the two clients drift.


    **Two kinds of auth.** The dashboard sends a Supabase access token as a
    Bearer JWT. MCP agents send `X-API-Key`, and the organization is resolved
    from the key.


    **Two data modes.** SERP results and Google Trends are fetched live on
    request. Everything else is written by the worker and read from Postgres, so
    a freshly-created project returns empty until its jobs complete.
servers:
  - url: https://api.surnex.io
    description: Surnex API
security: []
paths:
  /v1/trends/explore:
    get:
      tags:
        - trends
      summary: Search interest over time
      description: >-
        One of only two live-on-request features, with SERP. Trends are about
        what is happening now, so they are cached for six hours rather than a
        day.
      parameters:
        - schema:
            type: string
            format: uuid
          required: false
          name: org_id
          in: query
        - schema:
            type: integer
            nullable: true
            default: 2840
          required: false
          name: location_code
          in: query
        - schema:
            type: string
            default: en
          required: false
          name: language_code
          in: query
        - schema:
            type: string
            description: Comma-separated, up to five.
          required: true
          description: Comma-separated, up to five.
          name: keywords
          in: query
        - schema:
            type: string
            enum:
              - past_7_days
              - past_30_days
              - past_90_days
              - past_12_months
              - past_5_years
            default: past_12_months
          required: false
          name: date_range
          in: query
      responses:
        '200':
          description: One series per keyword
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    nullable: true
                    properties:
                      data:
                        type: object
                        properties:
                          keywords:
                            type: array
                            items:
                              type: string
                          date_range:
                            type: string
                          location_code:
                            type: integer
                          series:
                            type: array
                            items:
                              type: object
                              properties:
                                keyword:
                                  type: string
                                data_points:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      date:
                                        type: string
                                      date_to:
                                        type: string
                                        nullable: true
                                      value:
                                        type: number
                                        nullable: true
                                    required:
                                      - date
                                      - date_to
                                      - value
                              required:
                                - keyword
                                - data_points
                        required:
                          - keywords
                          - date_range
                          - location_code
                          - series
                      cached:
                        type: boolean
                    required:
                      - data
                      - cached
                required:
                  - success
                  - data
        '402':
          description: No research lookups left this month, or no active plan
          content:
            application/json:
              schema:
                type: object
                properties: {}

````

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