Get national holidays


I am making an application and would like to know if there is any way to get national holidays.

For example: Some Google Calendar API where I can get some XML to consume ..

asked by anonymous 25.06.2015 / 20:55

5 answers


The Multitable has a Webservice in PHP . It is possible to obtain not only national holidays, but also regional holidays.

25.06.2015 / 21:09

You can use the link which is an API that supports the following countries / regions BE , BR , GB , NO or US (note that it uses ISO 3166-1 alpha-2 which is version alpha ).

Just make a request for the address that can be used with any language, in C # it should look something like:

WebRequest request = WebRequest.Create("");

request.Credentials = CredentialCache.DefaultCredentials;

((HttpWebRequest) request).UserAgent = context.Request.UserAgent;

HttpWebResponse response = (HttpWebResponse) request.GetResponse();

if (response.StatusCode != HttpStatusCode.OK) {
} else {
    Stream receiveStream = response.GetResponseStream();

    //Converte a resposta para objeto

Or you can download from GitHub: link (see the link )

As an example (unfortunately the repository is only for PHP, but you can use the .json files):

require '../lib/HolidayAPIv1.php';
$api = new \HolidayAPI\v1($redis);
header('Content-Type: application/json; charset=utf-8');
if (isset($_REQUEST['pretty'])) {
    $flags |= JSON_PRETTY_PRINT;
echo json_encode($api->getHolidays(), $flags);
25.06.2015 / 21:07

Elekto (notice: it's my company) provides a free JSONP API, explained in detail here .

It is the API that is used in our working day deadlines tool . The focus, however, is the financial market.

The tool has been in the air since 2012-05, hosted in São Paulo (less latency).

01.07.2015 / 02:17

The big problem in Brazil is the municipal holidays and the amount of existing cities.

I only found an API that has holidays from all counties. I'm using and it worked fine:


It's free, just put the email on this page.

30.11.2016 / 05:45

In Portugal but without municipalities.


01.10.2018 / 11:41