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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.affinda.com/feedback

```json
{
  "path": "/api-reference/search-&-match/search-through-parsed-resumes",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Search through parsed resumes

> Searches through parsed resumes. Users have 3 options to create a search:<br /><br /> 1.	Match to a job description - a parsed job description is used to find candidates that suit it<br /> 2.	Match to a resume - a parsed resume is used to find other candidates that have similar attributes<br /> 3.	Search using custom criteria<br /><br /> Users should only populate 1 of jobDescription, resume or the custom criteria.



## OpenAPI

````yaml https://api.affinda.com/static/v3/api_spec.yaml post /v3/resume_search
openapi: 3.0.3
info:
  description: >-
    # Introduction

    Affinda uses the latest advancements in AI technology to rapidly process
    documents with better-than-human accuracy.

    This guide covers how to:

    * Extract structured data from a range of document types

    * Integrate our solutions into your platform

    * Manage users


    *Note: This API spec is for v3 of the API, the deprecated v2 documentation
    [can be found here](https://api.affinda.com/docs/v2)*


    > **Important: Use the correct API URL for your region.** Affinda is hosted
    across multiple instances. Make sure you are sending requests to the correct
    URL for your account:

    > | Instance | API Base URL |

    > |----------|-------------|

    > | **AUS / Global** | `https://api.affinda.com` |

    > | **US** | `https://api.us1.affinda.com` |

    > | **EU** | `https://api.eu1.affinda.com` |

    >

    > You can determine your instance from the URL you use to access the Affinda
    web app (e.g. `app.us1.affinda.com` means you are on the US instance). When
    using the "Try it" feature, select the matching region from the server
    dropdown.

    # Getting Started

    * Obtain an API key by [signing up for a
    free-trial](https://app.affinda.com/auth/register)

    * (Recommended) Download and install one of our client libraries: *
    [Python](https://github.com/affinda/affinda-python) : `pip install affinda`
    * [Javascript](https://github.com/affinda/affinda-typescript) : `npm install
    @affinda/affinda` * [.NET](https://github.com/affinda/affinda-dotnet):
    `dotnet add package Affinda.API` *
    [Java](https://github.com/affinda/affinda-java) - [maven
    repository](https://mvnrepository.com/artifact/com.affinda.api/affinda-api-client)

    * Without a client library, API requests via HTTP according to the API spec
    in this documentation
  version: v3
  title: Affinda API
  contact:
    email: contact@affinda.com
  license:
    name: MIT
    url: https://raw.githubusercontent.com/affinda/affinda-api-spec/master/LICENSE
  x-logo:
    url: https://api.affinda.com/static/documentation/affinda_logo.png
    backgroundColor: '#FFFFFF'
    altText: Affinda logo
servers:
  - url: https://{region}.affinda.com
    description: >-
      Select the correct server for your instance: api (AUS/Global), api.us1
      (US), or api.eu1 (EU).
    variables:
      region:
        default: api
        description: >-
          The instance region. Use 'api' for AUS/Global, 'api.us1' for US, or
          'api.eu1' for EU. You can find your region in the Affinda web app URL.
        enum:
          - api
          - api.eu1
          - api.us1
        x-ms-parameter-location: client
security:
  - ApiKeyAuth: []
tags:
  - name: Documents
    description: >
      Operations to upload documents for parsing.


      A document can be uploaded using `file` or `url`, one of these parameters
      must be provided.


      A document can be uploaded to a `workspace` or a `collection`, one of
      these parameters must also be provided.


      When uploaded to a workspace, the document's specific type will be
      predicted and auto classified into one of the collections before being
      parsed.


      When uploaded to a collection, the document will be parsed using that
      collection's extractor.
  - name: Organizations
    description: |
      Operations to manage organizations and organization memberships.

      Organizations are the top-level entity for managing users and workspaces.
  - name: Workspaces
    description: |
      Operations to manage workspaces.

      Workspaces group together related collections of documents.
  - name: Document Types
    description: >
      Operations to manage document types.


      Document types represent specific categories of documents with common
      extraction patterns, such as invoices or resumes.
  - name: Data Sources
    description: >
      Operations to manage custom mapping data sources. These are used to map
      from raw data extracted by

      Affinda AI models onto your own data model.
  - name: Validation Results
    description: >
      Operations to manage validation results.


      Validation results track the status and outcomes of document validation
      processes.
  - name: Usage
    description: >
      Operations to retrieve credits consumption.


      Returns daily credits usage for an organization, optionally narrowed to a
      single

      workspace or document type.
  - name: Tags
    description: >
      Operations to manage tags.


      Tags can be arbitrarily attached to documents to help organize and manage
      them.
  - name: Annotations
    description: >
      Operations to manually create, update, delete annotations.


      Together with the data point endpoints, these helps to annotate your
      documents with arbitrary data,

      or to edit annotations that were created by the Affinda parser.
  - name: Webhooks
    description: >
      Manage webhook integrations with your apps.


      Affinda have implemented webhooks to allow the data extracted by Affinda
      to be 'pushed' to you when an event occurs

      (e.g. document parsed or document validated), instead of you having to
      constantly poll our API to 'pull' the data to your system.
  - name: Search & Match
    description: >
      Operations to search through an index of documents and manage indexes via
      the Affinda Resume Parser API or a client library.


      Resumes and job descriptions must be explicitly added to an index, which
      then makes them searchable.
  - name: Deprecated End Points
    description: >
      Deprecated endpoints that are maintained for backward compatibility.


      These endpoints include Data Point, Collection, and Users functionality
      that has been superseded by newer APIs.
  - name: Add x-hidden to endpoints
    description: >
      Hidden endpoints not intended for public use.


      These endpoints include Splitting, Extractor, Organization, and Workspace
      Memberships & Usage functionality.
paths:
  /v3/resume_search:
    post:
      tags:
        - Search & Match
      summary: Search through parsed resumes
      description: "Searches through parsed resumes. Users have 3 options to create a search:<br /><br /> 1.\tMatch to a job description - a parsed job description is used to find candidates that suit it<br /> 2.\tMatch to a resume - a parsed resume is used to find other candidates that have similar attributes<br /> 3.\tSearch using custom criteria<br /><br /> Users should only populate 1 of jobDescription, resume or the custom criteria."
      operationId: createResumeSearch
      parameters:
        - $ref: '#/components/parameters/offsetParam'
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            example: 20
          description: The numbers of results to return.
          x-ms-parameter-location: method
      requestBody:
        description: Search parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeSearchParameters'
      responses:
        '201':
          description: Will return matching documents
          x-summary: Will return matching documents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResumeSearch'
        '400':
          $ref: '#/components/responses/400Error'
        '401':
          $ref: '#/components/responses/401Error'
        default:
          $ref: '#/components/responses/DefaultError'
components:
  parameters:
    offsetParam:
      in: query
      name: offset
      required: false
      schema:
        type: integer
        minimum: 0
        example: 0
      description: >-
        The number of documents to skip before starting to collect the result
        set.
      x-ms-parameter-location: method
  schemas:
    ResumeSearchParameters:
      type: object
      additionalProperties: false
      nullable: false
      required:
        - indices
      properties:
        indices:
          type: array
          example:
            - all-resumes
          items:
            type: string
        jobDescription:
          $ref: '#/components/schemas/Identifier'
          nullable: true
        resume:
          $ref: '#/components/schemas/Identifier'
          nullable: true
        jobTitles:
          type: array
          items:
            type: string
        jobTitlesCurrentOnly:
          type: boolean
          description: Search only through the canditate's current job
        jobTitlesRequired:
          type: boolean
        jobTitlesWeight:
          type: number
          minimum: 0
          maximum: 1
        yearsExperienceMin:
          type: integer
          nullable: true
          minimum: 0
          description: Minimum years of total work experience
        yearsExperienceMax:
          type: integer
          nullable: true
          minimum: 0
          description: Maximum years of total work experience
        yearsExperienceRequired:
          type: boolean
        yearsExperienceWeight:
          type: number
          minimum: 0
          maximum: 1
        locations:
          type: array
          description: Search by location name or by coordinates
          items:
            $ref: '#/components/schemas/ResumeSearchParametersLocation'
        locationsWeight:
          type: number
          minimum: 0
          maximum: 1
        locationsRequired:
          type: boolean
        skills:
          type: array
          items:
            $ref: '#/components/schemas/ResumeSearchParametersSkill'
        skillsWeight:
          type: number
          minimum: 0
          maximum: 1
        languages:
          type: array
          items:
            $ref: '#/components/schemas/ResumeSearchParametersSkill'
        languagesWeight:
          type: number
          minimum: 0
          maximum: 1
        institutions:
          type: array
          items:
            type: string
        institutionsRequired:
          type: boolean
        degrees:
          type: array
          items:
            type: string
        degreesRequired:
          type: boolean
        highestDegreeTypes:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/EducationLevel'
        highestDegreeTypesRequired:
          type: boolean
        isCurrentStudent:
          type: boolean
          description: Search for student canditates
        isCurrentStudentRequired:
          type: boolean
        isRecentGraduate:
          type: boolean
          description: Search for canditates that graduated less than a year ago
        isRecentGraduateRequired:
          type: boolean
        educationWeight:
          type: number
          minimum: 0
          maximum: 1
        searchExpression:
          type: string
          nullable: true
          description: Search through resumes' raw text
        searchExpressionRequired:
          type: boolean
        searchExpressionWeight:
          type: number
          minimum: 0
          maximum: 1
        socCodes:
          type: array
          items:
            type: integer
            description: >-
              A list of occupation group IDs, more details can be found in the
              <occupation_groups> endpoint
            minimum: 1
            maximum: 9999
        socCodesWeight:
          type: number
          minimum: 0
          maximum: 1
        socCodesRequired:
          type: boolean
        managementLevel:
          $ref: '#/components/schemas/ManagementLevel'
        managementLevelRequired:
          type: boolean
        managementLevelWeight:
          type: number
          minimum: 0
          maximum: 1
        customData:
          type: array
          items:
            $ref: '#/components/schemas/ResumeSearchParametersCustomData'
    ResumeSearch:
      type: object
      additionalProperties: false
      properties:
        count:
          type: integer
          example: 130
          minimum: 0
          description: Total number of results
        next:
          type: string
          nullable: true
          example: https://api.affinda.com/v3/documents?limit=300&offset=300
          description: URL to request next page of results
        previous:
          type: string
          nullable: true
          example: https://api.affinda.com/v3/documents?limit=300
          description: URL to request previous page of results
        parameters:
          $ref: '#/components/schemas/ResumeSearchParameters'
        results:
          type: array
          items:
            $ref: '#/components/schemas/ResumeSearchResult'
    Identifier:
      type: string
      description: A random string that uniquely identify the resource.
    ResumeSearchParametersLocation:
      type: object
      properties:
        name:
          type: string
          default: ''
        coordinates:
          type: object
          nullable: true
          properties:
            latitude:
              type: number
              nullable: true
            longitude:
              type: number
              nullable: true
        distance:
          type: integer
          default: 100
          minimum: 1
        unit:
          type: string
          enum:
            - km
            - mi
          default: km
          x-ms-enum:
            name: searchLocationUnit
    ResumeSearchParametersSkill:
      type: object
      properties:
        name:
          type: string
        required:
          type: boolean
    EducationLevel:
      type: string
      example: bachelors
      nullable: true
      enum:
        - school
        - certificate
        - bachelors
        - masters
        - doctoral
      x-ms-enum:
        name: educationLevel
    ManagementLevel:
      type: string
      example: Low
      nullable: true
      enum:
        - None
        - Low
        - Mid
        - Upper
      x-ms-enum:
        name: managementLevel
    ResumeSearchParametersCustomData:
      type: object
      allOf:
        - $ref: '#/components/schemas/SearchParametersCustomData'
    ResumeSearchResult:
      type: object
      additionalProperties: false
      required:
        - identifier
        - score
        - pdf
        - jobTitle
        - managementLevel
        - experience
        - skills
        - languages
        - location
        - education
        - occupationGroup
        - searchExpression
        - customData
      properties:
        identifier:
          $ref: '#/components/schemas/Identifier'
        score:
          type: number
          example: 0.98
        pdf:
          type: string
          example: https://affinda-api.s3.amazonaws.com/media/documents/Example-Resume
          nullable: true
        name:
          type: string
          example: Mary Jane
        jobTitle:
          $ref: '#/components/schemas/JobTitleSearchScoreComponent'
        managementLevel:
          $ref: '#/components/schemas/ManagementLevelSearchScoreComponent'
        experience:
          $ref: '#/components/schemas/ExperienceSearchScoreComponent'
        skills:
          $ref: '#/components/schemas/SkillsSearchScoreComponent'
        languages:
          $ref: '#/components/schemas/LanguagesSearchScoreComponent'
        location:
          $ref: '#/components/schemas/LocationSearchScoreComponent'
        education:
          $ref: '#/components/schemas/EducationSearchScoreComponent'
        occupationGroup:
          $ref: '#/components/schemas/OccupationGroupSearchScoreComponent'
        searchExpression:
          $ref: '#/components/schemas/SearchExpressionSearchScoreComponent'
        customData:
          $ref: '#/components/schemas/CustomDataSearchScoreComponent'
    RequestError:
      type: object
      additionalProperties: false
      required:
        - type
        - errors
      properties:
        type:
          type: string
          example: validation_error
        errors:
          type: array
          items:
            type: object
            required:
              - attr
              - code
              - detail
            properties:
              attr:
                type: string
                nullable: true
                example: non_field_errors
              code:
                type: string
                example: unique
              detail:
                type: string
                example: This index name has already been used
    SearchParametersCustomData:
      type: object
      required:
        - filterType
        - query
      properties:
        filterType:
          type: string
          enum:
            - equals
            - range
          example: equals
          description: >-
            Data points of "text" type support only "equals" filterType, others
            support both "equals" and "range"
        dataPoint:
          type: string
          nullable: true
          example: isAvailable
          description: The data point's slug, used for portal v2 (deprecated)
          deprecated: true
        field:
          type: string
          nullable: true
          example: isAvailable
          description: The field's slug
        query:
          type: object
          example:
            value: true
          description: >-
            "equals" searches require the "value" key inside the query, and
            "range" searches require at least one of "gte" (greater than or
            equal) and "lte" (less than or equal)
        required:
          type: boolean
        weight:
          type: number
          minimum: 0
          maximum: 1
    JobTitleSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Software Developer
        label:
          type: string
          example: Job Title
        score:
          type: number
          nullable: true
          example: 0.68
    ManagementLevelSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Low
        label:
          type: string
          example: Management level
        score:
          type: number
          nullable: true
          example: 0.68
    ExperienceSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: 2.0 - 3.0 years
        label:
          type: string
          example: Experience
        score:
          type: number
          nullable: true
          example: 0.68
    SkillsSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Python (Programming Language), Software Development
        label:
          type: string
          example: Skills
        score:
          type: number
          nullable: true
          example: 0.68
    LanguagesSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: English
        label:
          type: string
          example: Languages
        score:
          type: number
          nullable: true
          example: 0.68
    LocationSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Roxburgh Park, Australia
        label:
          type: string
          example: Location
        score:
          type: number
          nullable: true
          example: 0.68
    EducationSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Architecture Interior Design
        label:
          type: string
          example: Education
        score:
          type: number
          nullable: true
          example: 0.68
    OccupationGroupSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        value:
          type: string
          example: Programmers and software development professionals
        label:
          type: string
          example: Occupation group
        score:
          type: number
          nullable: true
          example: 0.68
    SearchExpressionSearchScoreComponent:
      type: object
      additionalProperties: false
      required:
        - label
      properties:
        label:
          type: string
          example: Search expression
        value:
          type: string
        score:
          type: number
          nullable: true
          example: 0.68
    CustomDataSearchScoreComponent:
      type: object
      additionalProperties:
        type: object
        required:
          - label
        properties:
          value:
            type: string
            example: 'True'
          label:
            type: string
            example: Is available
          score:
            type: number
            nullable: true
            example: 0.68
  responses:
    400Error:
      description: >-
        Bad request. If it is a validation error will contain a list of each
        invalid field
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
    401Error:
      description: Authorisation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
    DefaultError:
      description: UnexpectedError
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Basic authentication using an API key, e.g. `{Authorization: Bearer
        aff_0bb4fbdf97b7e4111ff6c0015471094155f91}`.

        You can find your API key within the Settings page of the [Affinda web
        app](https://app.affinda.com/). You can obtain an API key by [signing up
        for a free trial](https://app.affinda.com/auth/register).

````