python indeed api wrapper

Python Wrapper for Indeed Job Search API

If you are searching for jobs, or building a jobs database, Indeed is your first stop. One of the largest job aggregator out there, Indeed has loads of active jobs in every industry and it also offers an API to search for job listings based on various parameters.

Recently, I was looking for a Python wrapper to work with Indeed API. Unable to find one that fulfills my requirements, I wrote a quick and simple Python script that consumes Indeed job search API and stores the search results in a CSV.

Python wrapper for Indeed Job Search API.

In order to run the script and fetch jobs from Indeed job search API, you must have:

  • Indeed Publisher API ID, available for free from here
  • Python 3.x
  • BeautifulSoup and Requests libraries

Usage:

The code for Python wrapper for Indeed Job Search API is available at GitHub. [Download it from here].

Open indeedapiwrapper.py, add following parameters to fetch job listings through Indeed Job Search API:

    params = {
        'publisher': "",    # publisher ID (Required)
        'q': "",            # Job search query
        'l': "",            # location (city / state)
        'co': "",           # Two letter Country Code
        'sort': "",         # Sort order, date or relevance
        'days': ""          # number of days to fetch jobs, maximum is 7 days
        }   

Note:

  • Publisher Id is required.
  • To search jobs, either provide query string or combination of location and country code.
  • To return relevant jobs, the script requires the presence of either query string or the combination of location and country code. In case query sting is not present and either one of location or country code is missing, the script will use “Karachi” and “pk” as default location and country code.

For example, following search parameters will search for all Python jobs in Karachi, Pakistan.

    params = {
        'publisher': "0000000000000000",    # Use valid Id to get results 
        'q': "python",  
        'l': "karachi",  
        'co': "pk",  
        'sort': "date",                # Sort by date
        'days': "3"                    # get jobs for 3 days, including today
        }   

Output:

The list of jobs will be saved in a CSV file “indeedjobs.csv” in the same directory where the script resides.

Resources:

Indeed job search API documentation is available here.

Code for Python wrapper for Indeed Job Search API [Download it from here].

Consultant for Python | Conversion Optimization | Adsense | SEO | Niche Websites. [Check my Portfolio here]

If you found the above post interesting, join my list to get updated when the next one comes up.

For consulting assignments, contact me here with your requirements.


  

Leave a Comment