curl --request GET \
--url https://api.dataville.com/{source}/{keywords} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/{source}/{keywords}"
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/{source}/{keywords}', 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/{source}/{keywords}",
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/{source}/{keywords}"
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/{source}/{keywords}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/{source}/{keywords}")
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": "2301.00001",
"title": "Attention Is All You Need",
"body": "Authors: Ashish Vaswani, Noam Shazeer\nPublished: 2017-06-12\nSummary: The dominant sequence transduction models...",
"source": "arxiv",
"language": "en",
"last_updated": "2017-06-12T00:00:00Z",
"entities": [
"transformer",
"attention",
"machine translation"
],
"metadata": {
"arxiv_id": "1706.03762",
"categories": [
"cs.CL",
"cs.LG"
],
"pdf_url": "https://arxiv.org/pdf/1706.03762"
}
},
"usage": {
"requests_remaining": 4821,
"request_limit": 5000,
"credits_total": 29,
"credits_remaining": 24.11,
"credits_used": 4.89,
"request_cost": 0.005
}
}Search a data source
Search any supported data source by keyword and return the single most relevant result. This is the primary endpoint of the API.
Supported source values (aliases in parentheses): wiki (wikipedia),
census, arxiv, gutenberg, fooddata, paperswithcode, edgar
(sec, sec-edgar), news (frontpage-news), stackexchange
(stackoverflow, stack-exchange), pypi, openalex.
keywords is free text and may contain spaces and slashes; URL-encode it.
curl -H "Authorization: Bearer $DATAVILLE_API_KEY" \
"https://api.dataville.com/arxiv/attention%20is%20all%20you%20need"
curl --request GET \
--url https://api.dataville.com/{source}/{keywords} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dataville.com/{source}/{keywords}"
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/{source}/{keywords}', 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/{source}/{keywords}",
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/{source}/{keywords}"
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/{source}/{keywords}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataville.com/{source}/{keywords}")
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": "2301.00001",
"title": "Attention Is All You Need",
"body": "Authors: Ashish Vaswani, Noam Shazeer\nPublished: 2017-06-12\nSummary: The dominant sequence transduction models...",
"source": "arxiv",
"language": "en",
"last_updated": "2017-06-12T00:00:00Z",
"entities": [
"transformer",
"attention",
"machine translation"
],
"metadata": {
"arxiv_id": "1706.03762",
"categories": [
"cs.CL",
"cs.LG"
],
"pdf_url": "https://arxiv.org/pdf/1706.03762"
}
},
"usage": {
"requests_remaining": 4821,
"request_limit": 5000,
"credits_total": 29,
"credits_remaining": 24.11,
"credits_used": 4.89,
"request_cost": 0.005
}
}Authorizations
A Dataville API key, sent as Authorization: Bearer dataville_.... Clients
that cannot set headers may pass the same key as ?token=.
Path Parameters
Data source name or alias.
wiki, wikipedia, census, arxiv, gutenberg, fooddata, paperswithcode, edgar, sec, sec-edgar, news, frontpage-news, stackexchange, stackoverflow, stack-exchange, pypi, openalex URL-encoded search terms. May contain spaces and slashes.
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?