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

# Launch a search

> Starts a search on `criteria` (run exactly as sent) or on a `jd_text` Revcenter reads. A retry with the same `Idempotency-Key`, project and body returns the same search; the same key on a different request returns `409 idempotency_key_reused`. Uses 1 shortlist credit per search; none with `database_only: true`.

Needs scope `searches:write`.



## OpenAPI

````yaml /openapi.json post /projects/{projectId}/searches
openapi: 3.1.0
info:
  title: Revcenter API
  version: v1
  description: Projects, searches, scored candidates and shortlists.
servers:
  - url: https://api.revcenter.ai/v1
security:
  - bearer: []
tags:
  - name: Reference
  - name: Projects
  - name: Searches
  - name: Scoring
  - name: Shortlists
  - name: Health
paths:
  /projects/{projectId}/searches:
    post:
      tags:
        - Searches
      summary: Launch a search
      description: >-
        Starts a search on `criteria` (run exactly as sent) or on a `jd_text`
        Revcenter reads. A retry with the same `Idempotency-Key`, project and
        body returns the same search; the same key on a different request
        returns `409 idempotency_key_reused`. Uses 1 shortlist credit per
        search; none with `database_only: true`.


        Needs scope `searches:write`.
      parameters:
        - name: projectId
          in: path
          required: true
          description: A project id
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          description: 8 to 160 printable characters; reuse it to retry safely.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                criteria:
                  $ref: '#/components/schemas/Criteria'
                jd_text:
                  type: string
                  minLength: 40
                database_only:
                  type: boolean
                  description: >-
                    Search only the workspace's candidates on file. Uses no
                    shortlist.
                target_count:
                  type: integer
                  minimum: 1
                  maximum: 100
      responses:
        '200':
          description: >-
            A retry with the same Idempotency-Key and request: the first search,
            with reused true.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LaunchedSearch'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '202':
          description: Launched.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LaunchedSearch'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '402':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Criteria:
      type: object
      description: See the Criteria guide and GET /reference/criteria for every field.
      properties:
        title_variants:
          type: array
          items:
            type: string
        metro:
          type: string
        allowed_metros:
          type: array
          items:
            type: string
        remote_ok:
          type: boolean
        seniority:
          type: string
          enum:
            - c_suite
            - vp
            - director
            - manager
            - ic
        years_experience:
          type: object
          properties:
            min:
              type: number
            max:
              type: number
            enforcement:
              type: string
              enum:
                - hard
                - preferred
        current_industries:
          type: array
          items:
            type: string
        exclude_industries:
          type: array
          items:
            type: string
        functions:
          type: array
          items:
            type: string
        employers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              temporal:
                type: string
                enum:
                  - current
                  - past
                  - either
              flag:
                type: string
                enum:
                  - must
                  - prefer
                  - exclude
        schools:
          type: array
          items:
            type: string
        must_have:
          type: array
          items:
            type: string
        skills:
          type: array
          items:
            type: string
        shortlist_min_score:
          type: integer
      additionalProperties: true
    LaunchedSearch:
      type: object
      properties:
        search_id:
          type: string
        reused:
          type: boolean
        compiled_by:
          type: string
          enum:
            - caller
            - revcenter_model
        criteria:
          $ref: '#/components/schemas/Criteria'
        database_only:
          type: boolean
    Meta:
      type: object
      properties:
        request_id:
          type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    Error:
      description: An error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key from Settings → Usage → API (rvc_live_…).

````

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