rapid-api-helper
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

RapidAPI Helper

A wrapper for RapidAPI to help use Techmap's Job Data APIs

This is a TypeScript helper package that simplifies the process of interacting with the Job Posting API provided by Techmap. It provides type-safe interfaces and methods for making API requests, retrieving data, and managing authentication.

Right now has limited support for the Daily International Job Postings API.

It uses axios as a dependency to make the api requests.

Installation & Setup

To install rapid-api-helper into your project, use the following command:

npm install rapid-api-helper

or

yarn add rapid-api-helper

NOTE: you need to copy your RAPIDAPI_JOBS_API_KEY into the .env.local file (but never share it with someone else or on GitHub)

Using the Jobs Postings API

Authentication

You need to subscribe to the API on RapidAPI and enter the API_KEY in the .env.local file before you can create an API connection. To create an API client use the following:

import {RAPIDAPI_API} from 'rapid-api-helper';

const jobsAPI = new RAPIDAPI_API(process.env.RAPIDAPI_JOBS_API_KEY);

Making API Requests

The RAPIDAPI_API class provides methods for making API requests to different endpoints of the Job Posting API. For example, to retrieve the first 10 job postings for "Data Scientist" in the United States on 1. January 2024:

    const response = await jobsAPI.search({
        title: 'Data Scientist',
        dateCreated: '2024-01-01',
        page: 1
    });

    console.log(response.data);

The search method returns a promise that resolves to an object containing the API response. The data property of the response object contains an array of up to 10 JobPosting objects.

Job Posting Data

Each object represents a job posting and contains the job's searchable data as well as the core data in Schema.org JobPosting format using JSON-LD, such as:

  • url: The URL of the job posting
  • title: The title of the job posting
  • description: The description of the job posting
  • datePosted: The date and time the job posting was created
  • hiringOrganization: The company that posted the job
  • jobLocation: The location of the job posting
  • baseSalary: The salary (range) as mentioned in the job posting

... and many more.


More Documentation on the API can be found here:

Package Sidebar

Install

npm i rapid-api-helper

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

11.8 kB

Total Files

10

Last publish

Collaborators

  • joerg.rech