curl --request GET \
--url https://api.dataville.com/api/v1/export/{source} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/api/v1/export/{source}"
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/{source}', 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/{source}",
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/{source}"
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/{source}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/api/v1/export/{source}")
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_bodyBinary file stream — gutenberg.csv or gutenberg.parquet{
"status": "error",
"message": "<string>"
}{
"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."
}Download one source as CSV or Parquet
Stream a whole dataset as CSV or Parquet. Requires authentication and is credit-metered; a failed or aborted download is refunded.
curl -L -H "Authorization: Bearer $DATAVILLE_API_KEY" \
"https://api.dataville.com/api/v1/export/gutenberg?format=parquet" \
-o gutenberg.parquet
Parquet responses support HTTP range requests so DuckDB’s httpfs can read
them remotely:
SELECT * FROM read_parquet('https://api.dataville.com/api/v1/export/gutenberg?format=parquet&token=YOUR_KEY') LIMIT 10;
curl --request GET \
--url https://api.dataville.com/api/v1/export/{source} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/api/v1/export/{source}"
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/{source}', 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/{source}",
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/{source}"
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/{source}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/api/v1/export/{source}")
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_bodyBinary file stream — gutenberg.csv or gutenberg.parquet{
"status": "error",
"message": "<string>"
}{
"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=.
Path Parameters
One of the exportable sources.
gutenberg, fooddata, pwc_methods, pwc_datasets, wiki, edgar, stackexchange, pypi, openalex, arxiv Query Parameters
csv, parquet, db 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 dataset file.
Response headers
| Header | Example |
|---|---|
Content-Disposition | attachment; filename="gutenberg.parquet" |
X-Dataville-Success | true |
X-Dataville-Message | gutenberg.parquet downloaded successfully. |
RateLimit-Remaining | 999 |
format=parquet adds Content-Length, Accept-Ranges: bytes,
ETag and Last-Modified; a range request against it returns 206
with Content-Range, which is what lets DuckDB read the file
remotely. format=db sets Content-Length. format=csv is
streamed as it is generated and sends neither.
The response is of type file.
Was this page helpful?