API v3 Documentation

Endpoints Code Lookup

Code Samples

Here are some examples of how to programatically fetch data from the National Statistical API.

cURL

curl https://api3.natst.at/xxxx-xxxxxx/...

Perl

use strict;
use warnings;
use Mojo::UserAgent;
use Data::Dumper;

my $url = "https://api3.natst.at/xxxx-xxxxxx/...";
print Dumper(Mojo::UserAgent->new->get($url)->result->json);

PHP

$url = 'https://api3.natst.at/xxxx-xxxxxx/...';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
print_r(json_decode($data));

Python

import requests
url = "https://api3.natst.at/xxxx-xxxxxx/..."
print(requests.get(url).json())