Code Samples
Here are some examples of how to programatically fetch data from Interstat.
cURL
curl https://interst.at/endpoint/scope/range
Perl
use strict; use warnings; use Mojo::UserAgent; use Data::Dumper; my $url = "https://interst.at/endpoint/scope/range"; print Dumper(Mojo::UserAgent->new->get($url)->result->json);
PHP
$url = 'https://interst.at/endpoint/scope/range'; $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://interst.at/endpoint/scope/range" print(requests.get(url).json())