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

# Get web search

> How often the models ran a web search before answering, and what they searched for. The share of answers that searched, then one entry per prompt with the distinct search queries, how many times each was seen, and the average number of queries per search.

Use it: pass `prompt_id` for one prompt (what the Web Search card on its page shows), or leave it out for every active prompt, most queries first (the Query Fanout table).

Cost: 2 API credits.

Limits: Up to 31 days in one call. `limit` caps the prompts returned (default 50, up to 100); `meta.prompts_total` says how many there were.

Needs: Read.




## OpenAPI

````yaml /openapi.yaml get /projects/{project}/web-search
openapi: 3.1.0
info:
  title: Radarkit API
  version: 1.0.0
  summary: Your AI visibility data, outside the dashboard.
  description: >
    Radarkit tracks how AI assistants answer the questions your customers ask,
    and what each answer says about your brand. This API gives you that data as
    JSON.


    Every request needs an API key in the `Authorization` header. Every response
    has the same shape: `data`, `meta`, `credits` and `request_id`. Most calls
    cost 1 API credit. Heavier calls cost 2. Exports spend Export rows instead,
    one per row.
  contact:
    name: Radarkit support
    email: mail@radarkit.ai
    url: https://radarkit.ai
servers:
  - url: https://api.radarkit.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Your key, your plan and both balances. Free.
  - name: Projects
    description: One project is one brand or website. Every other call needs a project id.
  - name: Topics
    description: Topics group prompts. Every prompt belongs to one topic.
  - name: Prompts
    description: The questions Radarkit asks every AI model on a schedule.
  - name: Visibility
    description: The daily visibility score per model, precomputed.
  - name: Responses
    description: One row per AI answer, with everything Radarkit found in it.
  - name: Sources
    description: The web pages AI answers cite or consult.
  - name: Competitors
    description: Who the answers recommend and how often.
  - name: Rankings
    description: Recommended domains with their position in the answer.
  - name: Query fanout
    description: The web searches a model ran before answering, one row per answer.
  - name: Web search
    description: How often the models searched and what they searched for, summarised.
  - name: Sentiment
    description: How the answers talk about your brand.
  - name: Exports
    description: >
      Thousands of rows as one gzip file. Four calls in order: estimate, create,
      poll, download.


      Estimate is free and returns the exact row count. Create charges that many
      Export rows and queues the job. Poll the export until its status is
      `ready`. Download follows a redirect to a signed link that works for 30
      minutes. Files are kept for 7 days.
  - name: Content
    description: Have the Content agent write an article for a prompt, then poll the run.
paths:
  /projects/{project}/web-search:
    get:
      tags:
        - Web search
      summary: Get web search
      description: >
        How often the models ran a web search before answering, and what they
        searched for. The share of answers that searched, then one entry per
        prompt with the distinct search queries, how many times each was seen,
        and the average number of queries per search.


        Use it: pass `prompt_id` for one prompt (what the Web Search card on its
        page shows), or leave it out for every active prompt, most queries first
        (the Query Fanout table).


        Cost: 2 API credits.


        Limits: Up to 31 days in one call. `limit` caps the prompts returned
        (default 50, up to 100); `meta.prompts_total` says how many there were.


        Needs: Read.
      operationId: getWebSearch
      parameters:
        - $ref: '#/components/parameters/project'
        - $ref: '#/components/parameters/from'
        - $ref: '#/components/parameters/to'
        - $ref: '#/components/parameters/model'
        - $ref: '#/components/parameters/prompt_id'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: The search rate and the queries per prompt.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebSearch'
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      from:
                        type: string
                        format: date
                      to:
                        type: string
                        format: date
                      models:
                        type: array
                        items:
                          type: string
                      prompt_id:
                        type:
                          - integer
                          - 'null'
                      limit:
                        type: integer
                      count:
                        type: integer
                      prompts_total:
                        type: integer
                  credits:
                    $ref: '#/components/schemas/Credits'
                  request_id:
                    $ref: '#/components/schemas/RequestId'
              example:
                data:
                  answers: 18
                  searched: 16
                  search_rate: 88.9
                  prompts:
                    - prompt:
                        id: 2048
                        text: best crm for a startup
                      answers: 18
                      searched: 16
                      search_rate: 88.9
                      query_count: 10
                      avg_queries_per_search: 1.8
                      queries:
                        - query: best crm startups 2026
                          count: 3
                        - query: hubspot free crm limits
                          count: 1
                meta:
                  project: 64f1a2b3c4d5e6f708192a3b
                  from: '2026-08-01'
                  to: '2026-08-31'
                  models:
                    - chatgpt
                    - gemini
                    - perplexity
                  prompt_id: 2048
                  limit: 50
                  count: 1
                  prompts_total: 1
                credits:
                  charged: 2
                  remaining: 2934
                request_id: req_01j9x4v9l0m1n2o3p4q5r6s7u5
        '400':
          $ref: '#/components/responses/BadWindow'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/ProjectNotFound'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '504':
          $ref: '#/components/responses/QueryTimeout'
components:
  parameters:
    project:
      name: project
      in: path
      required: true
      description: The project id. 24 characters. From List projects.
      schema:
        type: string
        pattern: ^[0-9a-f]{24}$
      example: 64f1a2b3c4d5e6f708192a3b
    from:
      name: from
      in: query
      description: >-
        First day, `YYYY-MM-DD`, in the project's timezone. Default: the window
        your dashboard shows, 7 or 30 days back.
      schema:
        type: string
        format: date
      example: '2026-08-01'
    to:
      name: to
      in: query
      description: 'Last day, `YYYY-MM-DD`, included. Default: today.'
      schema:
        type: string
        format: date
      example: '2026-08-31'
    model:
      name: model
      in: query
      description: >-
        One model name, or several separated by commas: `chatgpt`, `gemini`,
        `perplexity`, `copilot`, `aimode`, `aioverview`. Default: every model
        the project tracks. Names the plan does not include are ignored.
      schema:
        type: string
        maxLength: 120
      example: chatgpt,gemini
    prompt_id:
      name: prompt_id
      in: query
      description: Only rows for this prompt.
      schema:
        type: integer
        minimum: 1
    limit:
      name: limit
      in: query
      description: Rows per page, 1 to 100. Default 50.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
  schemas:
    WebSearch:
      type: object
      properties:
        answers:
          type: integer
          description: Answers in the window.
        searched:
          type: integer
          description: Answers that ran a web search.
        search_rate:
          type: number
          description: searched as a share of answers, 0 to 100.
        prompts:
          type: array
          items:
            type: object
            properties:
              prompt:
                type: object
                properties:
                  id:
                    type: integer
                  text:
                    type:
                      - string
                      - 'null'
              answers:
                type: integer
              searched:
                type: integer
              search_rate:
                type: number
              query_count:
                type: integer
                description: Distinct search queries.
              avg_queries_per_search:
                type: number
                description: Average queries per answer that searched.
              queries:
                type: array
                items:
                  type: object
                  properties:
                    query:
                      type: string
                    count:
                      type: integer
                      description: Answers that ran this query.
    Credits:
      type: object
      description: >-
        What this call cost and what is left. Also in the
        `X-RadarKit-Credits-Charged` and `X-RadarKit-Credits-Remaining` headers.
      properties:
        charged:
          type: integer
          description: API credits spent on this call.
        remaining:
          type:
            - integer
            - 'null'
          description: API credits left on the billed account. Null on free calls.
    RequestId:
      type: string
      description: >-
        A unique id for this call. Also in the `X-Request-Id` header. Quote it
        when you contact support.
      example: req_01j9x4m2p7q8r9s0t1u2v3w4x5
    Error:
      type: object
      description: Every failed call has this shape and no `data`.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable. Build on this, not on the message.
            message:
              type: string
              description: For people. May change.
            details:
              description: >-
                More when there is more to say. Which field failed, how long to
                wait, which id already exists.
              oneOf:
                - type: object
                - type: array
                  items:
                    type: object
        request_id:
          $ref: '#/components/schemas/RequestId'
  responses:
    BadWindow:
      description: >-
        `DATE_RANGE_TOO_LARGE`: more than 31 days, use an export.
        `INVALID_CURSOR`: the cursor does not match these filters, start from
        the first page.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: DATE_RANGE_TOO_LARGE
              message: The date range can span at most 31 days. Use exports for more.
              details:
                max_days: 31
            request_id: req_01j9x4s6b7c8d9e0f1g2h3i4j6
    Unauthenticated:
      description: >-
        `UNAUTHENTICATED`: no key, a wrong key, or a revoked or expired key.
        `KEY_IN_QUERY` (400) if the key was in the URL.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHENTICATED
              message: >-
                Missing or invalid API key. Send it as: Authorization: Bearer
                rk_live_YOUR_KEY
            request_id: req_01j9x4q7z8y9x0w1v2u3t4s5r6
    PaymentRequired:
      description: >-
        `INSUFFICIENT_CREDITS`: no API credits left, nothing ran.
        `PLAN_INACTIVE`: the key owner's plan is not active.
        `OWNER_PLAN_INACTIVE`: the project owner's plan is not active.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_CREDITS
              message: Not enough API credits.
            request_id: req_01j9x4q7z8y9x0w1v2u3t4s5r7
    Forbidden:
      description: >-
        `SCOPE_MISSING`: the key lacks the permission this call needs.
        `PROJECT_FORBIDDEN`: the key cannot reach this project. `API_FROZEN`:
        API access for the account is paused.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: PROJECT_FORBIDDEN
              message: This key cannot access that project.
            request_id: req_01j9x4q7z8y9x0w1v2u3t4s5r9
    ProjectNotFound:
      description: '`PROJECT_NOT_FOUND`: no project with that id.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: PROJECT_NOT_FOUND
              message: No project with that id.
            request_id: req_01j9x4q7z8y9x0w1v2u3t4s5s0
    ValidationFailed:
      description: >-
        `VALIDATION_FAILED`: a parameter is missing or wrong. `details` lists
        each field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_FAILED
              message: One or more parameters are invalid.
              details:
                - path: from
                  message: The from field must match the format Y-m-d.
            request_id: req_01j9x4s6b7c8d9e0f1g2h3i4j5
    RateLimited:
      description: >-
        `RATE_LIMITED`: too many calls. Wait the seconds in `Retry-After` and
        send the same request again. Nothing was charged.
      headers:
        Retry-After:
          description: Seconds to wait.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RATE_LIMITED
              message: Too many requests. Slow down and retry.
              details:
                retry_after: 21
            request_id: req_01j9x4r2s3t4u5v6w7x8y9z0a1
    QueryTimeout:
      description: >-
        `QUERY_TIMEOUT`: the query took too long. Nothing was charged. Narrow
        the range or create an export.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: QUERY_TIMEOUT
              message: The query took too long. Narrow the date range or use exports.
            request_id: req_01j9x4r2s3t4u5v6w7x8y9z0a2
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key. Create one in Settings, API keys. Send it as
        `Authorization: Bearer rk_live_YOUR_KEY`.

````