Building a Simple Job Finder Tool Using RapidAPI’s Free API

Introduction

In today’s competitive job market, finding suitable employment opportunities can be challenging. However, with the power of technology, we can leverage APIs to create tools that streamline the job search process. In this article, we will explore how to build a simple job finder tool using a free API from RapidAPI. By combining HTML and JavaScript, we can create a user-friendly application that fetches and displays job listings, empowering job seekers to discover relevant opportunities with ease.

rapidapi

Understanding RapidAPI

RapidAPI (https://rapidapi.com/hub) is a popular API marketplace that provides access to a wide range of APIs, including job search APIs. These APIs allow developers to retrieve job-related data, such as job titles, descriptions, locations, and more. For this project, we will be utilizing a free job search API available on RapidAPI to retrieve job listings.

Setting Up the HTML Structure

To begin, let’s create the basic structure of our job finder tool using HTML. We will need an input field to enter search queries, a search button, and a results section to display the retrieved job listings. You can use the following code as a starting point:

<h4> Fast and Simple Job Search for jobs posted on LinkedIn, Indeed, Glassdoor, ZipRecruiter, BeBee and many others</h4> 
<label for="inputText">Enter Text (Example: Automation Testing in Chennai):</label> 
<input type="text" id="inputText"> 
<button id="fetchButton">Fetch Jobs</button> 
 
<label for="outputTextArea">Output:</label> 
<textarea id="outputTextArea" rows="10" cols="50" readonly=""></textarea> 
 
<button id="downloadButton">Download (output.txt)</button> 
 
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> 
<script src="get_jobs.js"></script> 
<script src="downloadtotext.js"></script>

Implementing JavaScript Functionality

get_jobs.js

Next, let’s add the JavaScript code to fetch job listings based on the user’s search query and display them on the page. Create new files named get_jobs.js and downloadtotext.js and add the following code:

document.getElementById('fetchButton').addEventListener('click', fetchData);

async function fetchData() {
  const inputText = document.getElementById('inputText').value;
  const outputTextArea = document.getElementById('outputTextArea');

  const options = {
    method: 'GET',
    url: 'https://jsearch.p.rapidapi.com/search',
    params: {
      query: inputText,
      page: '1',
      num_pages: '1'
    },
    headers: {
      'X-RapidAPI-Key': 'YOUR RAPID API',
      'X-RapidAPI-Host': 'jsearch.p.rapidapi.com'
    }
  };

  try {
    const response = await axios.request(options);
    const data = response.data;

    console.log(data); // Print the response data to the console for debugging

    // Parse the data and format it for display
    const formattedData = formatData(data);

    outputTextArea.value = formattedData;
  } catch (error) {
    console.error(error); // Print the complete error object to the console for debugging
    outputTextArea.value = 'Error: ' + error.message;
  }
}

function formatData(data) {
  let formattedData = '';

  if (data.status === 'OK' && Array.isArray(data.data)) {
    data.data.forEach(job => {
      formattedData += 'Job Title: ' + job.job_title + '\n';
      formattedData += 'Job Employment Type: ' + job.job_employment_type + '\n'; 
      formattedData += 'Employer: ' + job.employer_name + '\n';
      formattedData += 'Employer Website: ' + job.employer_website + '\n';
      formattedData += 'Job Title: ' + job.job_title + '\n';  
      formattedData += 'Job Description: ' + job.job_description + '\n';
         formattedData += 'Job Apply Link: ' + job.job_apply_link + '\n';
      formattedData += 'Job Quality Score: ' + job.job_apply_quality_score + '\n';
      formattedData += 'Job Expiration Date and Time (UTC): ' + job.job_offer_expiration_datetime_utc + '\n';
       
       
      formattedData += '---------------------------------------------------------------------------------\n';
    });
  } else {
    formattedData = 'No results found.';
  }

  return formattedData;
}

downloadtotext.js

// downloadtotext.js

function downloadToTextFile() {
const content = document.getElementById(‘outputTextArea’).value;
const formattedContent = formatContent(content);
const blob = new Blob([formattedContent], { type: ‘text/plain’ });
const url = URL.createObjectURL(blob);

const a = document.createElement(‘a’);
a.href = url;
a.download = ‘output.txt’;
a.click();

URL.revokeObjectURL(url);
}

function formatContent(content) {
const lines = content.split(‘\n’);
const formattedLines = lines.map(line => line.trim()).join(‘\r\n’);
return formattedLines;

}
document.getElementById(‘downloadButton’).addEventListener(‘click’, downloadToTextFile);

Obtaining the RapidAPI Key

To make requests to the job search API, you need to obtain an API key from RapidAPI. Visit the RapidAPI website (https://www.rapidapi.com) and sign up for a free account. Once registered, search for the job search API you want to use and subscribe to the free plan. RapidAPI will provide you with an API key that you can insert into the JavaScript code where indicated.

Testing the Job Finder Tool

With everything set up, open the HTML file in a web browser. Enter a job title or keyword in the search input field and click the search button. The JavaScript code will make a request to the RapidAPI endpoint, passing the search query and your API key. The response containing job listings will be displayed in the results section of the page.

Other Free Job Search APIs Worth Knowing

JSearch (used above) isn’t the only free option if you’re comparing job search APIs. A few others worth knowing about:

  • Adzuna API — aggregates listings across many job boards internationally, with a free developer tier suitable for small projects and prototypes.
  • USAJOBS API — completely free, official access to United States federal government job postings. The best free option if your use case is specifically US federal roles.
  • Jooble API — a free job-search aggregator API with broad international coverage, commonly used for building job boards and search widgets.

JSearch’s advantage is breadth — it aggregates listings from LinkedIn, Indeed, Glassdoor, ZipRecruiter, and more in one call, which is why it’s the one used in this tutorial. If your project needs a narrower, specific source (government jobs, a single country, a single board), one of the alternatives above may be a better fit.

Frequently Asked Questions

What is the best free job search API?
It depends on your scope. For breadth across many job boards in one call, JSearch (used in this guide) is a strong default. For US federal government roles specifically, USAJOBS is free and official. For general aggregation with wide international coverage, Adzuna and Jooble are both worth evaluating.

Is there a truly free job listing API, with no credit card required?
RapidAPI’s free tiers (including JSearch) typically require creating a free RapidAPI account but not a credit card for the free plan — check the specific API’s pricing page on RapidAPI before subscribing, since free-tier limits and requirements can change. USAJOBS’ API is free and does not require RapidAPI at all.

Do free job search APIs have usage limits?
Yes, almost always — free tiers typically cap the number of requests per month. That’s usually enough for a personal project, prototype, or portfolio piece like the one built in this guide, but a production job board with real traffic will likely need a paid tier.

Conclusion

Creating a simple job finder tool using RapidAPI’s free job search API is a powerful way to assist job seekers in finding relevant employment opportunities. By combining HTML and JavaScript, we can easily build an application that retrieves job listings based on user input. The flexibility of APIs allows developers to integrate various functionalities and tailor the tool to suit specific requirements. With this knowledge, you can expand upon the provided code and enhance the job finder tool to further assist individuals in their job search endeavors.

Link to Project: https://techhorizoncity.com/job-finder/

Further Reading: https://techhorizoncity.com/building-a-crypto-website-using-binance-api/

RapidAPI Link: https://rapidapi.com/hub

📑 About the author: I also build Digital Bizz Card — hosted digital business cards you can share with a QR code, no app required.

Translate »
Scroll to Top