Get document stats over time
curl --request GET \
--url http://localhost:8000/v1/stats/documents \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/stats/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/stats/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/stats/documents",
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 := "http://localhost:8000/v1/stats/documents"
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("http://localhost:8000/v1/stats/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/stats/documents")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"count": 23,
"date": "2025-12-05",
"pages": 892,
"size_bytes": 45678901
},
{
"count": 31,
"date": "2025-12-06",
"pages": 1204,
"size_bytes": 62345678
},
{
"count": 18,
"date": "2025-12-07",
"pages": 712,
"size_bytes": 38901234
}
],
"group_by": "day",
"period": {
"end": "2025-12-07",
"start": "2025-11-07"
},
"totals": {
"count": 72,
"pages": 2808,
"size_bytes": 146925813
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}stats
Get document stats over time
Get document upload statistics over time.
Returns document upload trends grouped by day, week, or month. Includes counts, page totals, and file sizes for each period.
GET
/
v1
/
stats
/
documents
Get document stats over time
curl --request GET \
--url http://localhost:8000/v1/stats/documents \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/stats/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/stats/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/stats/documents",
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 := "http://localhost:8000/v1/stats/documents"
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("http://localhost:8000/v1/stats/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/stats/documents")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"count": 23,
"date": "2025-12-05",
"pages": 892,
"size_bytes": 45678901
},
{
"count": 31,
"date": "2025-12-06",
"pages": 1204,
"size_bytes": 62345678
},
{
"count": 18,
"date": "2025-12-07",
"pages": 712,
"size_bytes": 38901234
}
],
"group_by": "day",
"period": {
"end": "2025-12-07",
"start": "2025-11-07"
},
"totals": {
"count": 72,
"pages": 2808,
"size_bytes": 146925813
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API Key authentication. Format: dk_test_ or dk_live_
Query Parameters
Time grouping interval
Available options:
day, week, month Start date (ISO 8601, default: 30 days ago)
End date (ISO 8601, default: today)
Response
Document upload trends with time-based grouping
Response for document stats over time (GET /v1/stats/documents).
Document upload trends with time-based grouping.
Time period covered
Show child attributes
Show child attributes
Example:
{
"end": "2025-12-07",
"start": "2025-11-07"
}
Grouping interval
Available options:
day, week, month Time series data points
Show child attributes
Show child attributes
Aggregated totals for the period
Show child attributes
Show child attributes
Example:
{
"count": 72,
"pages": 2808,
"size_bytes": 146925813
}