openapi: 3.0.0
info:
  title: HelloWork Jobs API
  description: |
    Search French job offers on HelloWork by keyword and place.

    Each offer returns its HelloWork job id, title, employer, place, contract type, working time, salary, remote level, duration, posting age and link. Filter by contract type, working time, remote level, posting date, radius and minimum salary, sort by relevance or date, and page to the end of the result set. Offers HelloWork adds to a small result set come back in `related_jobs`, apart from the matches in `jobs`.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: HelloWork Jobs Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `hellowork_jobs`'
          schema:
            type: string
            enum: ["hellowork_jobs"]
        - name: q
          in: query
          required: false
          description: Keywords in French, such as a job title, a skill or a company name. Required unless `location` is set.
          schema:
            type: string
            maxLength: 200
        - name: location
          in: query
          required: false
          description: French place to search in, such as a city (`Lyon`), a city and postcode (`Saint-Denis 93200`), a postcode, a department, a region or `France`. Required unless `q` is set.
          schema:
            type: string
            maxLength: 200
        - name: distance
          in: query
          required: false
          description: Search radius around a city, in kilometers.
          schema:
            type: integer
            enum: [0, 5, 10, 20, 50]
            default: 20
        - name: contract_type
          in: query
          required: false
          description: 'Contract types to search, separated by commas. Offers of any listed type are returned. Values: `cdi` (permanent), `cdd` (fixed term), `interim`, `internship`, `apprenticeship`, `freelance`, `independent`, `franchise`, `partner`, `civil_service`, `school_internship`.'
          schema:
            type: string
            pattern: '^ *(?:cdi|cdd|interim|internship|apprenticeship|freelance|independent|franchise|partner|civil_service|school_internship) *(?:, *(?:cdi|cdd|interim|internship|apprenticeship|freelance|independent|franchise|partner|civil_service|school_internship) *)*$'
        - name: job_type
          in: query
          required: false
          description: 'Working time to search, separated by commas. Values: `full_time`, `part_time`.'
          schema:
            type: string
            pattern: '^ *(?:full_time|part_time) *(?:, *(?:full_time|part_time) *)*$'
        - name: work_arrangement
          in: query
          required: false
          description: 'Remote levels to search, separated by commas. Values: `remote` (fully remote), `hybrid` (partly remote), `occasional_remote`, `on_site`.'
          schema:
            type: string
            pattern: '^ *(?:remote|hybrid|occasional_remote|on_site) *(?:, *(?:remote|hybrid|occasional_remote|on_site) *)*$'
        - name: time_period
          in: query
          required: false
          description: Posting date window of the offers.
          schema:
            type: string
            enum: ["last_day", "last_3_days", "last_week", "last_month"]
        - name: salary_min
          in: query
          required: false
          description: Yearly gross salary in euros that HelloWork's salary estimate for an offer must reach. Offers without a displayed salary can still match.
          schema:
            type: integer
            minimum: 1
            maximum: 100000
        - name: sort_by
          in: query
          required: false
          description: Order of the offers.
          schema:
            type: string
            enum: ["relevance", "date"]
            default: "relevance"
        - name: page
          in: query
          required: false
          description: Page of results to return. Each page holds up to 30 offers.
          schema:
            type: integer
            minimum: 1
            maximum: 50000
            default: 1
        - name: zero_retention
          in: query
          required: false
          description: Set to true to disable logging and persistent storage for this request. Enterprise plans only.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Validation Error. There is an issue with query parameters, such as missing required parameters or invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication Error. The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden. Zero data retention is not available to the account, or the account requires `zero_retention=true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate Limit Exceeded. The number of allowed requests has been exceeded. Consider upgrading your plan or waiting for the limit to reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error. Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Timeout. We could not retrieve results in 90 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Bearer authentication. Format: "Bearer YOUR_API_KEY"'
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Pass API key as query parameter
  schemas:
    SearchResponse:
      type: object
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        search_information:
          $ref: '#/components/schemas/SearchInformation'
        jobs:
          type: array
          description: Offers that match the search.
          items:
            $ref: '#/components/schemas/Job'
        related_jobs:
          type: array
          description: Offers HelloWork adds to a small result set, close to the search but not matching it.
          items:
            $ref: '#/components/schemas/Job'
        pagination:
          $ref: '#/components/schemas/Pagination'
        error:
          type: string
          description: Why there are no offers to return.
    SearchMetadata:
      type: object
      required: [status, created_at]
      properties:
        id:
          type: string
          description: "Unique identifier for the search request"
        status:
          type: string
          description: "Status of the search request"
        created_at:
          type: string
          format: date-time
          description: "Timestamp when the search was created"
        request_time_taken:
          type: number
          description: "Time taken to make the request in seconds"
        parsing_time_taken:
          type: number
          description: "Time taken to parse the results in seconds"
        total_time_taken:
          type: number
          description: "Total time taken for the search in seconds"
        request_url:
          type: string
          description: "HelloWork URL for this search"
        html_url:
          type: string
          description: "URL to view HTML results"
        json_url:
          type: string
          description: "URL to view JSON results"
    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine used for the request.
        q:
          type: string
          description: Keywords the search was run for.
        location:
          type: string
          description: Place the search was run for.
        distance:
          type: integer
          description: Search radius in kilometers.
        contract_type:
          type: string
          description: Contract types the search was filtered by.
        job_type:
          type: string
          description: Working time the search was filtered by.
        work_arrangement:
          type: string
          description: Remote levels the search was filtered by.
        time_period:
          type: string
          description: Posting date window of the search.
        salary_min:
          type: integer
          description: Lowest yearly gross salary the search was filtered by.
        sort_by:
          type: string
          description: Order the search asked for.
        page:
          type: integer
          description: Page of results requested.
    SearchInformation:
      type: object
      properties:
        total_results:
          type: integer
          description: Number of offers HelloWork reports for the search, related offers included.
        location:
          type: object
          description: Place HelloWork searched.
          required: [type, id]
          properties:
            type:
              type: string
              description: Kind of place HelloWork searched.
              enum: ["city", "district", "department", "region", "country"]
            id:
              type: string
              description: HelloWork's identifier for the place, an INSEE code without its leading zero, a department number or a country code.
    Job:
      type: object
      required: [job_id, title, is_remote, is_hybrid, is_super_recruiter, is_external_apply]
      properties:
        position:
          type: integer
          description: Rank of the offer in HelloWork's results across all pages, related offers included.
        job_id:
          type: string
          description: HelloWork identifier for the offer.
        title:
          type: string
          description: Offer title.
        company_name:
          type: string
          description: Name of the employer.
        company_logo:
          type: string
          description: URL of the employer's logo.
        location:
          type: string
          description: Place of the offer as HelloWork shows it.
        city:
          type: string
          description: City of the offer.
        department:
          type: string
          description: French department code of the offer.
        contract_type:
          type: string
          description: Contract type as HelloWork shows it, in French.
        job_type:
          type: string
          description: Working time of the offer.
          enum: ["full_time", "part_time"]
        salary:
          type: object
          description: Salary HelloWork shows for the offer.
          required: [text]
          properties:
            text:
              type: string
              description: Salary as HelloWork shows it.
            min:
              type: number
              description: Lower bound of the salary.
            max:
              type: number
              description: Upper bound of the salary.
            currency:
              type: string
              description: Currency of the salary.
              enum: ["EUR"]
            period:
              type: string
              description: Period the salary is given for.
              enum: ["hour", "day", "week", "month", "year"]
        remote_work:
          type: string
          description: Remote level as HelloWork shows it, in French.
        duration:
          type: string
          description: Length of the contract as HelloWork shows it, in French.
        tags:
          type: array
          description: Tags HelloWork lists for the offer after its working time, such as its remote level, length, dates or schedule, in French.
          items:
            type: string
        posted_at:
          type: string
          description: Relative time since the offer was posted, in French.
        link:
          type: string
          description: Link to the offer on HelloWork.
        is_remote:
          type: boolean
          description: Whether the offer is fully remote.
        is_hybrid:
          type: boolean
          description: Whether the offer is partly remote.
        is_super_recruiter:
          type: boolean
          description: Whether HelloWork marks the employer as a Super recruteur.
        is_external_apply:
          type: boolean
          description: Whether the application continues on the employer's own site after HelloWork's form.
    Pagination:
      type: object
      required: [current]
      properties:
        current:
          type: integer
          description: Current page.
        total_pages:
          type: integer
          description: Last page HelloWork serves for the search.
        next:
          type: integer
          description: Next page to request.
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
