Unirest is a library to simplify making HTTP REST requests. It’s open source and available in multiple languages.

Installing the Unirest library

Some APIs on Rakuten RapidAPI use the Unirest client. Unirest’s website, contains installation instructions for each supported programming language. To get started with Unirest in your programming language, choose from the list below and follow the installation instructions.

Calling an API endpoint

Unirest has its own documentation page where you can find all the different REST methods. It supports everything you need to start consuming API’s both on Rakuten RapidAPI and abroad.

After installing Unirest, you can make HTTP requests to any API endpoint in Rakuten RapidAPI. Each endpoint is accompanied with a code snippet that shows how to create the Unirest request that calls the endpoint. It is pre-filled with parameters as well as the mandatory X-Mashape-Authorization API key header.

var unirest = require('unirest');

.header("X-Mashape-Key", APP_KEY)
.header("X-Mashape-Host", API_HOST)
.end(function (result) {
  console.log(result.status, result.headers, result.body);

Reading the response

Responses from requests made in Unirest follow the same Object format across all supported languages. To see the response details, you can check the Reference section of the specific programming language below.

What if the API Uses Rakuten RapidAPI Connect Instead of Unirest?

Some APIs on Rakuten RapidAPI use the Rakuten RapidAPI Connect SDK instead of Unirest. To get started with Unirest, head over to our getting started with Rakuten RapidAPI SDKs documentation.