Calendar

FREE
By metropolisapi
Updated 4 months ago
Data
8/10
Popularity Score
512ms
Latency
73%
Success Rate

Calendar API Documentation

Calendar API supplies an accurate and reliable information about holidays all over the world. Metropolis also provides an useful date calculator and a week day indicator [This API is deprecated].

View API Details
GETdate-calculator
GETholiday-check
GETholidays
GETweek
GETdate-calculator

Use this endpoint to add or subtract any number of days given a specific date. Add or subtract days to a given date (for example: ignoring weekends) to calculate a past or future event. Usage sample: What date will it be in 30 workdays ?

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
dateSTRING
REQUIREDStart date. Format: yyyy-mm-dd
daysSTRING
REQUIREDDays to be added or subtracted given the start date.
operationSTRING
REQUIREDDate operation type: "add", "+", "subtract" or "-" days
countrySTRING
REQUIRED"ISO 2 letter country code" or "Name of the Country in English"
just-workdaysSTRING
REQUIRED"True" - Days in result will include just work days. Weekends will not be considered during the calculation. "False" - Days in result will include all days (including Weekends). Caution: We are sorry, but holidays are not considered at this time.
Code Snippet
unirest.get("https://metropolis-api-calendar.p.rapidapi.com/date-calculator?date=2014-04-15&days=10&operation=add&country=br&just-workdays=true")
.header("X-RapidAPI-Host", "metropolis-api-calendar.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://metropolis-api-calendar.p.rapidapi.com/date-calculator
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://metropolis-api-calendar.p.rapidapi.com/date-calculator?date=2014-04-15&days=10&operation=add&country=br&just-workdays=true")
.header("X-RapidAPI-Host", "metropolis-api-calendar.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication