openapi: 3.0.0
info:
  title: BDjobs Jobs API
  description: |
    Search BDjobs.com, the job board of Bangladesh, by keywords, location and filters.

    Each job returns its id, title, employer, job types, publishing time, application deadline, category, language and link, and its location, experience, education, salary, vacancies and logo when the posting states them. Filter by division, district or overseas country, category, industry, employer type, job type, job level, experience, salary, posting date, deadline and remote work, and page through 50 jobs a page. Paid job ads BDjobs shows in its Featured block come back apart as `sponsored_jobs`.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: BDjobs Jobs Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `bdjobs_jobs`'
          schema:
            type: string
            enum: ["bdjobs_jobs"]
        - name: q
          in: query
          required: false
          description: Keywords to search for, such as a job title, a skill or a company name. Use 2 to 200 characters. Leave it out to list every open job, newest first. BDjobs refuses to search some text, such as a script tag. Such a search returns an `error` and costs a credit.
          schema:
            type: string
            minLength: 2
            maxLength: 200
        - name: location
          in: query
          required: false
          description: Bangladesh division or district, or overseas country, by the name BDjobs uses, such as `Dhaka`, `Chattogram Division` or `Saudi Arabia`. Use `All Overseas` for every overseas job. `Dhaka` is the district. Older spellings such as `Chittagong` also work. Cannot be used with `location_id`. See the [location list](https://www.searchapi.io/docs/parameters/bdjobs-jobs/location).
          schema:
            type: string
        - name: location_id
          in: query
          required: false
          description: BDjobs location id of a district, a division or an overseas country, or `-2` for every overseas job. Cannot be used with `location`. See the [location list](https://www.searchapi.io/docs/parameters/bdjobs-jobs/location).
          schema:
            type: integer
            enum: [-2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008]
        - name: category_id
          in: query
          required: false
          description: BDjobs job category id, such as `1` for Accounting/Finance or `67` for Driver. See the [category list](https://www.searchapi.io/docs/parameters/bdjobs-jobs/category-id).
          schema:
            type: integer
            enum: [-11, -10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92]
        - name: industry_id
          in: query
          required: false
          description: BDjobs industry id of the employer, such as `11` for Information Technology (IT). See the [industry list](https://www.searchapi.io/docs/parameters/bdjobs-jobs/industry-id).
          schema:
            type: integer
            enum: [-10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
        - name: organization_type
          in: query
          required: false
          description: Type of employer.
          schema:
            type: string
            enum: ["government", "semi_government", "ngo", "private", "international", "other"]
        - name: job_type
          in: query
          required: false
          description: Employment type of the jobs.
          schema:
            type: string
            enum: ["full_time", "part_time", "contract", "internship"]
        - name: experience_level
          in: query
          required: false
          description: Job level of the jobs.
          schema:
            type: string
            enum: ["entry", "mid", "top"]
        - name: experience_min
          in: query
          required: false
          description: Fewest years of experience. Jobs whose experience range overlaps `experience_min` to `experience_max` are returned.
          schema:
            type: integer
            minimum: 0
            maximum: 30
        - name: experience_max
          in: query
          required: false
          description: Most years of experience. Must be at least `experience_min`.
          schema:
            type: integer
            minimum: 0
            maximum: 30
        - name: is_fresher
          in: query
          required: false
          description: Set to true for jobs open to candidates with no experience.
          schema:
            type: boolean
            default: false
        - name: salary_min
          in: query
          required: false
          description: Lowest monthly salary in taka. Only jobs that state a salary overlapping `salary_min` to `salary_max` are returned. With only `salary_min` set, the upper limit is 300000 BDT.
          schema:
            type: integer
            minimum: 5000
            maximum: 300000
        - name: salary_max
          in: query
          required: false
          description: Highest monthly salary in taka. Must be at least `salary_min`. With only `salary_max` set, the lower limit is 5000 BDT.
          schema:
            type: integer
            minimum: 5000
            maximum: 300000
        - name: time_period
          in: query
          required: false
          description: Posting date window of the jobs, in Bangladesh calendar days.
          schema:
            type: string
            enum: ["today", "last_2_days", "last_3_days", "last_4_days", "last_5_days"]
        - name: deadline_period
          in: query
          required: false
          description: Application deadline window of the jobs, in Bangladesh calendar days.
          schema:
            type: string
            enum: ["today", "tomorrow", "next_2_days", "next_3_days", "next_4_days"]
        - name: work_arrangement
          in: query
          required: false
          description: Set to `remote` for jobs done from home.
          schema:
            type: string
            enum: ["remote"]
        - name: page
          in: query
          required: false
          description: Page of results to return. Each page holds up to 50 jobs, and a page past the last returns an `error`.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 1
        - name: zero_retention
          in: query
          required: false
          description: Set to true to keep request parameters, HTML, and JSON responses out of storage and logs. 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
          items:
            $ref: '#/components/schemas/Job'
        sponsored_jobs:
          type: array
          description: Paid job ads BDjobs shows in its Featured block.
          items:
            $ref: '#/components/schemas/Job'
        pagination:
          $ref: '#/components/schemas/Pagination'
        error:
          type: string
          description: Why there are no jobs 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: "BDjobs URL for this search"
        html_url:
          type: string
          description: "URL to view the raw 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: Location name the search was run for.
        location_id:
          type: integer
          description: BDjobs location id the search was run for.
        category_id:
          type: integer
          description: BDjobs category id the search was filtered by.
        industry_id:
          type: integer
          description: BDjobs industry id the search was filtered by.
        organization_type:
          type: string
          description: Employer type the search was filtered by.
        job_type:
          type: string
          description: Employment type the search was filtered by.
        experience_level:
          type: string
          description: Job level the search was filtered by.
        experience_min:
          type: integer
          description: Fewest years of experience the search was filtered by.
        experience_max:
          type: integer
          description: Most years of experience the search was filtered by.
        is_fresher:
          type: boolean
          description: Whether the search was filtered to jobs open to freshers.
        salary_min:
          type: integer
          description: Lowest monthly salary in taka the search was filtered by.
        salary_max:
          type: integer
          description: Highest monthly salary in taka the search was filtered by.
        time_period:
          type: string
          description: Posting date window of the search.
        deadline_period:
          type: string
          description: Application deadline window of the search.
        work_arrangement:
          type: string
          description: Work arrangement the search was filtered by.
        page:
          type: integer
          description: Page of results requested.
        zero_retention:
          type: boolean
          description: Present as true when zero data retention is enabled for the search.
    SearchInformation:
      type: object
      required: [total_results]
      properties:
        total_results:
          type: integer
          description: Number of jobs BDjobs reports for the search.
        total_vacancies:
          type: integer
          description: Number of open positions across the jobs BDjobs reports for the search.
    Job:
      type: object
      required: [position, job_id, title, link, is_remote, is_easy_apply, is_premium]
      properties:
        position:
          type: integer
          description: Position of the job on the page.
        job_id:
          type: string
          description: BDjobs identifier of the job.
        title:
          type: string
          description: Job title.
        company_name:
          type: string
          description: Name of the employer.
        company_logo:
          type: string
          description: URL of the employer logo.
        location:
          type: string
          description: Job location as BDjobs shows it.
        job_types:
          type: array
          description: Employment types of the job, as BDjobs labels them.
          items:
            type: string
        experience:
          $ref: '#/components/schemas/Experience'
        education:
          type: array
          description: Degrees and education requirements the job lists.
          items:
            type: string
        salary:
          $ref: '#/components/schemas/Salary'
        vacancies:
          type: integer
          description: Number of open positions for the job.
        iso_date:
          type: string
          format: date-time
          description: Time the job was published, in UTC.
        deadline:
          type: string
          format: date
          description: Last day to apply, as a Bangladesh date.
        category_id:
          type: integer
          description: BDjobs category id of the job.
        category:
          type: string
          description: Name of the job category.
        language:
          type: string
          description: Language the job is posted in.
          enum: ["en", "bn"]
        link:
          type: string
          description: Link to the job on BDjobs.
        is_remote:
          type: boolean
          description: Whether the job can be done from home.
        is_easy_apply:
          type: boolean
          description: Whether applicants can apply through BDjobs.
        is_premium:
          type: boolean
          description: Whether the employer paid for a premium listing of the job.
    Experience:
      type: object
      description: Experience the job asks for.
      required: [text]
      properties:
        text:
          type: string
          description: Experience as BDjobs states it.
        min:
          type: integer
          description: Fewest years of experience.
        max:
          type: integer
          description: Most years of experience.
    Salary:
      type: object
      description: Salary the job states.
      required: [text, min, max]
      properties:
        text:
          type: string
          description: Salary as BDjobs states it.
        min:
          type: integer
          description: Lower bound of the salary.
        max:
          type: integer
          description: Upper bound of the salary.
        currency:
          type: string
          description: Currency of the salary.
          enum: ["BDT"]
        period:
          type: string
          description: Period the salary is paid for.
          enum: ["hour", "day", "week", "month", "year"]
    Pagination:
      type: object
      required: [current]
      properties:
        current:
          type: integer
          description: Current page number.
        total_pages:
          type: integer
          description: Number of pages BDjobs has for the search.
        next:
          type: integer
          description: Next page number.
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
