Get Data Sources
curl --request GET \
--url https://api.gurubase.io/api/v1/{guru_slug}/data-sources/ \
--header 'x-api-key: <api-key>'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
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.gurubase.io/api/v1/{guru_slug}/data-sources/', 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.gurubase.io/api/v1/{guru_slug}/data-sources/",
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.gurubase.io/api/v1/{guru_slug}/data-sources/"
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.gurubase.io/api/v1/{guru_slug}/data-sources/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
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{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 3272,
"type": "YOUTUBE",
"url": "https://youtube.com/watch?v=example1",
"title": null,
"status": "NOT_PROCESSED",
"error": "",
"date_created": "2025-01-22T21:45:17.212381Z",
"private": false,
"last_reindex_date": "2025-01-22T21:45:17.212394Z",
"reindex_count": 0
},
{
"id": 3271,
"type": "PDF",
"title": "document.pdf",
"status": "SUCCESS",
"error": "",
"date_created": "2025-01-22T21:43:58.423588Z",
"private": false,
"last_reindex_date": "2025-01-22T21:43:58.423608Z",
"reindex_count": 0
}
]
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Endpoints
Get Data Sources
Retrieve all data sources (YouTube URLs, Website URLs, and PDFs) for your Guru
GET
/
{guru_slug}
/
data-sources
/
Get Data Sources
curl --request GET \
--url https://api.gurubase.io/api/v1/{guru_slug}/data-sources/ \
--header 'x-api-key: <api-key>'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
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.gurubase.io/api/v1/{guru_slug}/data-sources/', 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.gurubase.io/api/v1/{guru_slug}/data-sources/",
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.gurubase.io/api/v1/{guru_slug}/data-sources/"
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.gurubase.io/api/v1/{guru_slug}/data-sources/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
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{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 3272,
"type": "YOUTUBE",
"url": "https://youtube.com/watch?v=example1",
"title": null,
"status": "NOT_PROCESSED",
"error": "",
"date_created": "2025-01-22T21:45:17.212381Z",
"private": false,
"last_reindex_date": "2025-01-22T21:45:17.212394Z",
"reindex_count": 0
},
{
"id": 3271,
"type": "PDF",
"title": "document.pdf",
"status": "SUCCESS",
"error": "",
"date_created": "2025-01-22T21:43:58.423588Z",
"private": false,
"last_reindex_date": "2025-01-22T21:43:58.423608Z",
"reindex_count": 0
}
]
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Get a list of all data sources added to your Guru, including their status and metadata.
Path Parameters
string
required
The slug of the Guru to get data sources from
Headers
string
required
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.
Response
The response includes pagination information and an array of data sources. Page size is 1000.
number
Total number of data sources
string
URL for the next page of results (null if no more pages)
string
URL for the previous page of results (null if first page)
array
Array of data sources
Show Data Source Object
Show Data Source Object
number
Unique identifier for the data source
string
Type of data source (PDF, WEBSITE, YOUTUBE)
string
URL for website and YouTube sources
string
Title of the data source
string
Processing status (NOT_PROCESSED, SUCCESS, FAIL)
string
Error message if processing failed
string
Creation date in ISO format
boolean
Privacy setting for PDF files. For other data sources, this is always false.
string
Date of last reindexing in ISO format
number
Number of times the source has been reindexed
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 3272,
"type": "YOUTUBE",
"url": "https://youtube.com/watch?v=example1",
"title": null,
"status": "NOT_PROCESSED",
"error": "",
"date_created": "2025-01-22T21:45:17.212381Z",
"private": false,
"last_reindex_date": "2025-01-22T21:45:17.212394Z",
"reindex_count": 0
},
{
"id": 3271,
"type": "PDF",
"title": "document.pdf",
"status": "SUCCESS",
"error": "",
"date_created": "2025-01-22T21:43:58.423588Z",
"private": false,
"last_reindex_date": "2025-01-22T21:43:58.423608Z",
"reindex_count": 0
}
]
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Was this page helpful?
⌘I