mirror of https://github.com/Bunsly/JobSpy
glassdoorindeedinternshipjob-scraperjob-searchjobs-scraperjobs-searchjobsearchjobseekerlinkedinlinkedin-scraperremote-jobremote-jobsremote-workziprecruiter
881ae37ff2 | ||
---|---|---|
api | ||
postman | ||
.gitignore | ||
README.md | ||
main.py | ||
requirements.txt | ||
settings.py |
README.md
JobSpy Scraper
Features
- Scrapes job postings from LinkedIn, Indeed, ZipRecruiter
- Returns jobs with title, location, company, and other data
- JWT authorization
Endpoints
Jobs Endpoint
Endpoint: /api/v1/jobs/
Parameters:
- site_type: str (Required) - Options:
linkedin
,zip_recruiter
,indeed
- search_term: str (Required)
- location: int
- distance: int
- job_type: str - Options:
fulltime
,parttime
,internship
,contract
- is_remote: bool
- results_wanted: int
- easy_apply: bool (Only for LinkedIn)
Example
Response
Upon successful query, the API will return a JSON object with the following schema:
Schema
JobResponse
- success: bool - Indicates if the request was successful.
- error: str - Any error messages, null if no error.
- jobs: list[JobPost] - A list of job postings.
- total_results: int - Total number of results found.
- returned_results: int - Number of results returned in this request.
JobPost
- title: str - Title of the job.
- company_name: str - Company offering the job.
- job_url: str - URL to the job posting.
- location: object - Contains the location details (country, city, state, postal_code, address).
- description: str - Description of the job.
- job_type: str - Type of job (fulltime, parttime, internship, contract).
- compensation: object - Contains compensation details (interval, min_amount, max_amount, currency).
- date_posted: str - The date when the job was posted.
Example
Installation
Python >= 3.10 required
- Clone this repository
- Install the dependencies with
pip install -r requirements.txt
- Run the server with
uvicorn main:app --reload
Usage
Visit http://localhost:8000/docs to see the interactive API documentation.
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 URLSUPABASE_KEY
: go to project settings -> API -> service_role secretJWT_SECRET_KEY
- typeopenssl rand -hex 32
in terminal to create a 32 byte secret key