openapi: 3.0.0
info:
  title: LinkedIn Job Details API
  description: |
    Get one LinkedIn job by its job id.

    Each job carries its title, company, location and posting time, with the full description, pay range, seniority level, employment type, industries, featured benefits, the applicant count, whether it takes Easy Apply and the person who posted it. Take the `job_id` from a recent response of the LinkedIn Jobs API.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: LinkedIn Job Details
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `linkedin_job_details`'
          schema:
            type: string
            enum: ["linkedin_job_details"]
        - name: job_id
          in: query
          required: true
          description: LinkedIn job id, the `job_id` of a job in a LinkedIn Jobs API response. For example, `4470016722`. A search with an id LinkedIn does not know returns an error.
          schema:
            type: string
            pattern: '^(?!0+$)[0-9]{1,18}$'
      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'
        '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'
        job:
          $ref: '#/components/schemas/Job'
        error:
          type: string
          description: "Error message returned instead of a job, such as for a `job_id` LinkedIn does not know"
    SearchMetadata:
      type: object
      required: [id, 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: "LinkedIn URL requested for the job's details, separate from the job page in `job.link`"
        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"
        job_id:
          type: string
          description: "LinkedIn job id requested"
    Job:
      type: object
      required: [job_id, title, company_name, location, posted_at, link]
      properties:
        job_id:
          type: string
          description: "LinkedIn job id"
        link:
          type: string
          description: "LinkedIn page of the job"
        title:
          type: string
          description: "Job title"
        company_name:
          type: string
          description: "Name of the hiring company"
        company_link:
          type: string
          description: "LinkedIn page of the hiring company"
        thumbnail:
          type: string
          description: "Logo of the hiring company"
        location:
          type: string
          description: "Location of the job as LinkedIn shows it"
        posted_at:
          type: string
          description: "How long ago the job was posted, as LinkedIn shows it"
        salary:
          type: string
          description: "Pay range LinkedIn shows for the job, such as `$54.00/hr - $84.00/hr`"
        description:
          type: string
          description: "Full job description in plain text, with LinkedIn's line breaks"
        seniority_level:
          type: string
          description: "Seniority level LinkedIn shows for the job, such as `Mid-Senior level`"
        employment_type:
          type: string
          description: "Employment type LinkedIn shows for the job, such as `Full-time`"
        industries:
          type: string
          description: "Industries LinkedIn shows for the job, in one string"
        featured_benefits:
          type: array
          items:
            type: string
          description: "Benefits LinkedIn infers from the job description, such as `Medical insurance`"
        is_easy_apply:
          type: boolean
          description: "Whether the job takes applications through LinkedIn's Easy Apply"
        applicants:
          type: integer
          description: "Number of applicants LinkedIn shows for the job"
        applicants_range:
          type: string
          enum: ["under_25", "over_200"]
          description: "Applicant range LinkedIn shows instead of an exact number"
        job_poster:
          $ref: '#/components/schemas/JobPoster'
    JobPoster:
      type: object
      required: [name, headline, link]
      properties:
        name:
          type: string
          description: "Name of the person who posted the job"
        headline:
          type: string
          description: "LinkedIn headline of the person who posted the job"
        link:
          type: string
          description: "LinkedIn profile of the person who posted the job"
        thumbnail:
          type: string
          description: "Profile photo of the person who posted the job"
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
