Download every dataset as a DuckDB database
curl --request GET \
--url https://api.dataville.com/api/v1/export/dataville.db \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/api/v1/export/dataville.db"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dataville.com/api/v1/export/dataville.db', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dataville.com/api/v1/export/dataville.db",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dataville.com/api/v1/export/dataville.db"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dataville.com/api/v1/export/dataville.db")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/api/v1/export/dataville.db")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"Binary file stream — dataville.db"{
"status": "error",
"message": "Authentication required. Include your API key in the Authorization header."
}{
"status": "error",
"account_state": "authenticated",
"error": "insufficient_credit",
"data": {
"error": "<string>",
"code": "INSUFFICIENT_CREDIT"
},
"credits": {
"remaining_usd": 123,
"request_cost_usd": 123
}
}{
"status": "error",
"message": "Export rate limit exceeded. Maximum 1,000 exports per day per account."
}Export and SQL
Download every dataset as a DuckDB database
A single .db file containing a table per source, ready to open in DuckDB.
GET
/
api
/
v1
/
export
/
dataville.db
Download every dataset as a DuckDB database
curl --request GET \
--url https://api.dataville.com/api/v1/export/dataville.db \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/api/v1/export/dataville.db"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dataville.com/api/v1/export/dataville.db', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dataville.com/api/v1/export/dataville.db",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dataville.com/api/v1/export/dataville.db"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dataville.com/api/v1/export/dataville.db")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/api/v1/export/dataville.db")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"Binary file stream — dataville.db"{
"status": "error",
"message": "Authentication required. Include your API key in the Authorization header."
}{
"status": "error",
"account_state": "authenticated",
"error": "insufficient_credit",
"data": {
"error": "<string>",
"code": "INSUFFICIENT_CREDIT"
},
"credits": {
"remaining_usd": 123,
"request_cost_usd": 123
}
}{
"status": "error",
"message": "Export rate limit exceeded. Maximum 1,000 exports per day per account."
}Authorizations
A Dataville API key, sent as Authorization: Bearer dataville_.... Clients
that cannot set headers may pass the same key as ?token=.
Query Parameters
API key as a query parameter, for clients that cannot set an
Authorization header (DuckDB WASM, the DuckDB CLI). Prefer the header
wherever possible — query strings end up in logs.
Response
The DuckDB database file.
Response headers
| Header | Example |
|---|---|
Content-Disposition | attachment; filename="dataville.db" |
Content-Length | 166735872 |
X-Dataville-Success | true |
X-Dataville-Message | DuckDB database file downloaded successfully. |
RateLimit-Remaining | 999 |
The response is of type file.
Was this page helpful?