job-seeker

View the Repository

image

Google Custom Job Searcher

This Node.js application uses the Google Custom Search API to retrieve search results based on specified criteria such as keywords, domains (including subdomains), locations, and publication date. The script filters out results containing undesirable phrases and continues paginating until it accumulates the number of unique new results defined by your configuration. These unique results are then appended to a CSV file, and their URLs are stored in a separate file so that duplicates are skipped in future searches.

Note: The API credentials and sensitive configuration details are stored in a config.json file, which is excluded from version control via .gitignore to protect your credentials. Your search results, stored in the google_search_results.csv file, and your list of processed URLs, stored in the processed_urls.txt file, are also excluded from version control via .gitignore to protect the privacy of your searches.

Features

Prerequisites

Setup

1. Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/thejessicafelts/job-seeker.git
cd job-seeker

2. Install Dependencies

Install the required Node.js dependencies in your project directory:

npm install node-fetch@2

3. Create the Configuration File

Create a file named config.json in the root of your repository. This file should contain your search criteria and API credentials. A sample configuration file is provided in the repository as sampleConfig.json; you should rename it to config.json and update the values as needed. A sample file for processed URLs is also provided in the repository as sampleProcessedUrls.txt; you should rename it to processed_urls.txt.

Below is an example configuration:

{
    "intitleKeywords": ["frontend developer"],
    "keywords": ["experienced", "senior"],
    "avoidKeywords": ["government clearance"],
    "minDate": ["2025-01-01"],
    "domains": ["workday.com", "icims.com"],
    "locations": ["Remote", "USA"],
    "maxResults": 10,
    "apiKey": "YOUR_API_KEY",
    "cx": "YOUR_CSE_ID"
}

IMPORTANT:

4. Set Up Your Google Custom Search API and CSE Keys

Getting Your API Key:

  1. Visit the Google Developers Console
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services > Library.
  4. Search for Custom Search API and enable it.
  5. Go to APIs & Services > Credentials and click Create Credentials > API Key.
  6. Copy your new API key and paste it into the config.json file under the "apiKey" field.

Creating a Custom Search Engine (CSE) and Obtaining the CSE ID:

  1. Go to the Google Programmable Search Engine.
  2. Click on “Add” or “New Search Engine”.
  3. In the “Sites to search” select “Search the entire web”, since this script allows you to provide your own list of URLs.
  4. Provide a name for your search engine and click “Create”.
  5. Once created, go to the Control Panel of your new search engine.
  6. Look for the “Search engine ID” (also known as the cx parameter).
  7. Copy the CSE ID and paste it into the config.json file under the "cx" field.

Usage

Once the configuration is complete, run the script with:

node googleSearch.js

The script will:

Customization

Feel free to adjust the parameters in config.json to meet your specific search criteria. The main script (googleSearch.js) is modular and uses clearly defined functions, making it straightforward to modify the query logic or output processing as needed.