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

# Run the query-mode iterator and return the next page of results (beta)

> Returns the next page of records for an existing query-mode search.



## OpenAPI

````yaml /openapi.json post /search/query-mode/{search_id}/run
openapi: 3.1.0
info:
  contact:
    name: Clay
    url: https://www.clay.com
  description: Programmatic access to Clay.
  title: Clay Public API
  version: '0'
servers:
  - description: production
    url: https://api.clay.com/public/v0
security:
  - ClayApiKey: []
tags:
  - description: Authenticated user and workspace endpoints.
    name: me
  - description: Search creation and pagination endpoints.
    name: search
  - description: Structured table query endpoints.
    name: tables
  - description: Routine discovery and execution endpoints.
    name: routines
paths:
  /search/query-mode/{search_id}/run:
    post:
      tags:
        - search
      summary: Run the query-mode iterator and return the next page of results (beta)
      description: Returns the next page of records for an existing query-mode search.
      operationId: runQueryMode
      parameters:
        - in: path
          name: search_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NextSearchResultsBody'
        description: Body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NextQueryModeResultsResponse'
          description: '200'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '400'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '401'
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '402'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '403'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '404'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '429'
components:
  schemas:
    NextSearchResultsBody:
      additionalProperties: false
      properties:
        limit:
          default: 20
          maximum: 500
          minimum: 1
          type: integer
      type: object
    NextQueryModeResultsResponse:
      oneOf:
        - $ref: '#/components/schemas/NextQueryModePeopleResultsResponse'
        - $ref: '#/components/schemas/NextQueryModeCompanyResultsResponse'
    ErrorResponse:
      additionalProperties: false
      properties:
        message:
          type: string
      required:
        - message
      type: object
    NextQueryModePeopleResultsResponse:
      additionalProperties: false
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicApiPersonSearchResult'
          type: array
        exhaustion_reason:
          enum:
            - query_limit
            - no_more_results
          type: string
        has_more:
          type: boolean
        period_quota:
          additionalProperties: false
          properties:
            limit:
              type: number
            remaining:
              type: number
            resets_at:
              type: string
            used:
              type: number
          required:
            - limit
            - used
            - remaining
            - resets_at
          type: object
        source_type:
          const: people
          type: string
      required:
        - data
        - has_more
        - source_type
      type: object
    NextQueryModeCompanyResultsResponse:
      additionalProperties: false
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicApiCompanySearchResult'
          type: array
        exhaustion_reason:
          enum:
            - query_limit
            - no_more_results
          type: string
        has_more:
          type: boolean
        period_quota:
          additionalProperties: false
          properties:
            limit:
              type: number
            remaining:
              type: number
            resets_at:
              type: string
            used:
              type: number
          required:
            - limit
            - used
            - remaining
            - resets_at
          type: object
        source_type:
          const: companies
          type: string
      required:
        - data
        - has_more
        - source_type
      type: object
    PublicApiPersonSearchResult:
      additionalProperties: false
      properties:
        clay_profile_id:
          type: number
        first_name:
          anyOf:
            - type: string
            - type: 'null'
        last_name:
          anyOf:
            - type: string
            - type: 'null'
        location:
          additionalProperties: false
          properties:
            city:
              anyOf:
                - type: string
                - type: 'null'
            name:
              anyOf:
                - type: string
                - type: 'null'
            state_or_province:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - name
            - city
            - state_or_province
          type: object
        matched_experiences:
          items:
            $ref: '#/components/schemas/PublicApiMatchedExperience'
          type: array
        name:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - clay_profile_id
        - name
        - first_name
        - last_name
        - location
        - matched_experiences
      type: object
    PublicApiCompanySearchResult:
      additionalProperties: false
      properties:
        annual_revenue:
          anyOf:
            - type: string
            - type: 'null'
        clay_company_id:
          type: number
        country:
          anyOf:
            - type: string
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
        domain:
          anyOf:
            - type: string
            - type: 'null'
        industry:
          anyOf:
            - type: string
            - type: 'null'
        linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        size:
          anyOf:
            - type: string
            - type: 'null'
        total_funding_amount_range_usd:
          anyOf:
            - type: number
            - type: 'null'
        type:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - clay_company_id
        - name
        - size
        - type
        - domain
        - country
        - industry
        - location
        - description
        - linkedin_url
        - annual_revenue
        - total_funding_amount_range_usd
      type: object
    PublicApiMatchedExperience:
      additionalProperties: false
      properties:
        company:
          anyOf:
            - type: string
            - type: 'null'
        end_date:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - type: string
            - type: 'null'
        start_date:
          anyOf:
            - type: string
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - company
        - title
        - location
        - start_date
        - end_date
      type: object
  securitySchemes:
    ClayApiKey:
      description: >-
        Personal API key tied to your Clay user. Create one under Settings →
        Account in the Clay app.
      in: header
      name: clay-api-key
      type: apiKey

````