Fetch an article by pasting its URL
curl --request GET \
--url https://api.dataville.com/https:/{wikipediaUrl} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/https:/{wikipediaUrl}"
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/https:/{wikipediaUrl}', 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/https:/{wikipediaUrl}",
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/https:/{wikipediaUrl}"
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/https:/{wikipediaUrl}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/https:/{wikipediaUrl}")
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{
"status": "success",
"account_state": "authenticated",
"data": {
"id": "<string>",
"title": "<string>",
"body": "<string>",
"source": "arxiv",
"language": "en",
"last_updated": "2023-11-07T05:31:56Z",
"entities": [
"<string>"
],
"metadata": {},
"stale": {
"message": "<string>",
"cached_at": "2023-11-07T05:31:56Z"
},
"onboarding": {
"message": "<string>"
}
},
"usage": {
"requests_remaining": 123,
"request_limit": 123,
"credits_total": 123,
"credits_remaining": 123,
"credits_used": 123,
"request_cost": 123
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"error": "insufficient_credit",
"data": {
"error": "<string>",
"code": "INSUFFICIENT_CREDIT"
},
"credits": {
"remaining_usd": 123,
"request_cost_usd": 123
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "arXiv is refusing requests right now, so this search could not be completed. This happens on arXiv's side when their service is under load β it is not a limit on your account and not caused by anything you did. No credit was used. Try again in about 2 minutes.",
"code": "UPSTREAM_RATE_LIMITED"
}
}Data sources
Fetch an article by pasting its URL
Paste a Wikipedia URL directly onto the API host and get the article back.
The path is the URL with its double slash collapsed to one, so
https://en.wikipedia.org/wiki/Moon_landing becomes:
curl "https://api.dataville.com/https:/en.wikipedia.org/wiki/Moon_landing"
http:/ works the same way. Metered at the premium (Wikipedia) rate.
GET
/
https:
/
{wikipediaUrl}
Fetch an article by pasting its URL
curl --request GET \
--url https://api.dataville.com/https:/{wikipediaUrl} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/https:/{wikipediaUrl}"
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/https:/{wikipediaUrl}', 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/https:/{wikipediaUrl}",
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/https:/{wikipediaUrl}"
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/https:/{wikipediaUrl}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/https:/{wikipediaUrl}")
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{
"status": "success",
"account_state": "authenticated",
"data": {
"id": "<string>",
"title": "<string>",
"body": "<string>",
"source": "arxiv",
"language": "en",
"last_updated": "2023-11-07T05:31:56Z",
"entities": [
"<string>"
],
"metadata": {},
"stale": {
"message": "<string>",
"cached_at": "2023-11-07T05:31:56Z"
},
"onboarding": {
"message": "<string>"
}
},
"usage": {
"requests_remaining": 123,
"request_limit": 123,
"credits_total": 123,
"credits_remaining": 123,
"credits_used": 123,
"request_cost": 123
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"error": "insufficient_credit",
"data": {
"error": "<string>",
"code": "INSUFFICIENT_CREDIT"
},
"credits": {
"remaining_usd": 123,
"request_cost_usd": 123
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "<string>",
"code": "UPSTREAM_RATE_LIMITED"
}
}{
"status": "error",
"account_state": "authenticated",
"data": {
"error": "arXiv is refusing requests right now, so this search could not be completed. This happens on arXiv's side when their service is under load β it is not a limit on your account and not caused by anything you did. No credit was used. Try again in about 2 minutes.",
"code": "UPSTREAM_RATE_LIMITED"
}
}Authorizations
A Dataville API key, sent as Authorization: Bearer dataville_.... Clients
that cannot set headers may pass the same key as ?token=.
Path Parameters
The rest of the article URL, e.g. en.wikipedia.org/wiki/Moon_landing.
Query Parameters
Truncate data.body to the first 100 characters.
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.
Was this page helpful?