Jobs scraper library for LinkedIn, Indeed, Glassdoor & ZipRecruiter
Go to file
Cullen Watson 369b1cffd6 chore: postman 2023-08-26 18:46:52 -05:00
.vscode chore: postman 2023-08-26 18:46:52 -05:00
api Feat/multiple sites (#12) 2023-08-26 14:28:02 -05:00
postman chore: postman 2023-08-26 18:46:52 -05:00
.gitignore feat(auth): add auth to jobs endpoint 2023-07-10 22:23:05 -05:00
README.md chore: postman 2023-08-26 18:46:52 -05:00
main.py chore: clean up 2023-08-19 18:46:03 -05:00
requirements.txt feat(users): add register route 2023-07-10 22:23:16 -05:00
settings.py feat: optional auth 2023-08-19 20:31:10 -05:00

README.md

JobSpy AIO Scraper

Features

  • Scrapes job postings from LinkedIn, Indeed & ZipRecruiter simultaneously
  • Returns jobs with title, location, company, description & other data
  • Optional JWT authorization

API

POST /api/v1/jobs/

Request Schema

Example

{
    "site_type": ["linkedin", "indeed"],
    "search_term": "software engineer",
    "location": "austin, tx",
    "distance": 10,
    "job_type": "fulltime",
    "results_wanted": 10
}

Parameters:

Required
  • site_type: List[str] - linkedin, zip_recruiter, indeed
  • search_term: str
Optional
  • location: int
  • distance: int
  • job_type: str - fulltime, parttime, internship, contract
  • is_remote: bool
  • results_wanted: int (per site_type)
  • easy_apply: bool (only for linkedIn)

Response Schema

Example

image

JobResponse

  • success: bool - Indicates if the request was successful

  • error: str

  • jobs: list[JobPost]

    • JobPost

      • title: str
      • company_name: str
      • job_url: str
      • location: object - (country, city, state, postal_code, address)
      • description: str
      • job_type: str - fulltime, parttime, internship, contract
      • compensation: object - Contains: interval, min_amount, max_amount, currency
      • date_posted: str
  • total_results: int

  • returned_results: int

Installation

Python >= 3.10 required

  1. Clone this repository git clone https://github.com/cullenwatson/jobspy
  2. Install the dependencies with pip install -r requirements.txt
  3. Run the server with uvicorn main:app --reload

Usage

To see the interactive API documentation, visit localhost:8000/docs.

For Postman integration:

  • Import the Postman collection and environment JSON files from the /postman/ folder.

FAQ

I'm having issues with my queries. What should I do?

Broadening your filters can often help. Additionally, try reducing the number of results_wanted.
If issues still persist, feel free to submit an issue.

How to enable auth?

Change AUTH_REQUIRED in /settings.py to True

The auth uses supabase. Create a project with a users table and disable RLS.

Add these three environment variables:

  • SUPABASE_URL: go to project settings -> API -> Project URL
  • SUPABASE_KEY: go to project settings -> API -> service_role secret
  • JWT_SECRET_KEY - type openssl rand -hex 32 in terminal to create a 32 byte secret key

Use these endpoints to register and get an access token:

image