cURL
curl --request GET \
--url https://api.statista.ai/v1/search/statistics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.statista.ai/v1/search/statistics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.statista.ai/v1/search/statistics', 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.statista.ai/v1/search/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.statista.ai/v1/search/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.statista.ai/v1/search/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statista.ai/v1/search/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"identifier": 123,
"title": "<string>",
"link": "<string>",
"date": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"platform": "de",
"subject": "<string>",
"is_premium": true,
"teaser_image_urls": [
{
"width": 123,
"src": "<string>"
}
],
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"ranking_score": 123,
"sources": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"publishers": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"chargers": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"industries": [
{
"name": "<string>",
"id": 123
}
],
"geolocations": [
{
"name": "<string>",
"code": "<string>",
"id": 123
}
]
}
],
"total_count": 123,
"total_pages": 123
}Statistics
Search
GET
/
v1
/
search
/
statistics
cURL
curl --request GET \
--url https://api.statista.ai/v1/search/statistics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.statista.ai/v1/search/statistics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.statista.ai/v1/search/statistics', 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.statista.ai/v1/search/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.statista.ai/v1/search/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.statista.ai/v1/search/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statista.ai/v1/search/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"identifier": 123,
"title": "<string>",
"link": "<string>",
"date": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"platform": "de",
"subject": "<string>",
"is_premium": true,
"teaser_image_urls": [
{
"width": 123,
"src": "<string>"
}
],
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"ranking_score": 123,
"sources": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"publishers": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"chargers": [
{
"title": "<string>",
"subtitle": "<string>"
}
],
"industries": [
{
"name": "<string>",
"id": 123
}
],
"geolocations": [
{
"name": "<string>",
"code": "<string>",
"id": 123
}
]
}
],
"total_count": 123,
"total_pages": 123
}Semantically search Statistics using natural language or keywords.
Query Parameters
The start date to search for content. The maximum search depth is limited to 20 years from today while the default is 3 months from today. Supported formats are
- RFC 33939 (
%Y-%m-%dT%H:%M:%Slike in ISO 8601) %Y-%m-%d %H:%M:%S- example2024-03-07 12:45:38%d.%m.%Y %H:%M:%S- example03.07.2024 12:45:38%Y/%m/%d %H:%M:%S- example2024/03/07 12:45:38%Y-%m-%d- example2024-03-07(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)%d.%m.%Y- example03.07.2024(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)%Y/%m/%d- example2024/03/07(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)
The end date to search for content. If not set, the current date is used. Supported formats are
- RFC 33939 (
%Y-%m-%dT%H:%M:%Slike in ISO 8601) %Y-%m-%d %H:%M:%S- example2024-03-07 12:45:38%d.%m.%Y %H:%M:%S- example03.07.2024 12:45:38%Y/%m/%d %H:%M:%S- example2024/03/07 12:45:38%Y-%m-%d- example2024-03-07(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)%d.%m.%Y- example03.07.2024(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)%Y/%m/%d- example2024/03/07(in this case we assume 00:00:00 as time for Start and 23:59:59 for End)
Response
The request has succeeded.
Was this page helpful?