Datasets
List datasets
GET
/
api
/
datasets
/
list
/
List datasets
curl --request GET \
--url https://api.keywordsai.co/api/datasets/list/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keywordsai.co/api/datasets/list/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keywordsai.co/api/datasets/list/', 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.keywordsai.co/api/datasets/list/",
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.keywordsai.co/api/datasets/list/"
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.keywordsai.co/api/datasets/list/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keywordsai.co/api/datasets/list/")
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_bodyAuthentication
- API key:
Authorization: Bearer <API key>
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "6d0b2c7e-3a6a-4c09-9c7e-1f2d9e2d3f0a",
"organization_id": 123,
"updated_by": {
"first_name": "Ann",
"last_name": "Lee",
"email": "ann@example.com"
},
"log_count": 250,
"name": "Support Conversations - July",
"log_ids": ["..."],
"description": "Sampled support chats for July",
"type": "sampling",
"status": "ready",
"created_at": "2025-07-26T00:00:00Z",
"updated_at": "2025-07-27T08:10:00Z",
"completed_annotation_count": 0,
"running_status": "pending",
"running_progress": 0
}
]
}
- 401 Unauthorized — Missing/invalid authentication
Was this page helpful?
⌘I
List datasets
curl --request GET \
--url https://api.keywordsai.co/api/datasets/list/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keywordsai.co/api/datasets/list/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keywordsai.co/api/datasets/list/', 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.keywordsai.co/api/datasets/list/",
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.keywordsai.co/api/datasets/list/"
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.keywordsai.co/api/datasets/list/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keywordsai.co/api/datasets/list/")
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