Search documentation
curl --request GET \
--url https://api.datalyr.com/v1/docs/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalyr.com/v1/docs/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalyr.com/v1/docs/search', 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.datalyr.com/v1/docs/search",
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.datalyr.com/v1/docs/search"
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.datalyr.com/v1/docs/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/docs/search")
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{
"query": "<string>",
"total": 123,
"source": "llms-full",
"results": [
{
"title": "<string>",
"url": "<string>",
"excerpt": "<string>",
"score": 123
}
],
"complete": true
}{
"error": "<string>"
}{
"error": "<string>"
}Workspace
Search documentation
Keyword search over the published DATALYR documentation at docs.datalyr.com. Returns the best-matching doc sections with a link and an excerpt, ranked by title and body matches.
This is the only endpoint that reads content outside your workspace. It needs the same Agent key as every other route, but the results are the same public documentation for every caller, so nothing about your workspace is used to produce them.
A 503 means the documentation site did not answer. It never means there are no matching docs — an empty results array with HTTP 200 means that.
GET
/
docs
/
search
Search documentation
curl --request GET \
--url https://api.datalyr.com/v1/docs/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalyr.com/v1/docs/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalyr.com/v1/docs/search', 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.datalyr.com/v1/docs/search",
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.datalyr.com/v1/docs/search"
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.datalyr.com/v1/docs/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/docs/search")
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{
"query": "<string>",
"total": 123,
"source": "llms-full",
"results": [
{
"title": "<string>",
"url": "<string>",
"excerpt": "<string>",
"score": 123
}
],
"complete": true
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Query Parameters
Response
Successful response.
Was this page helpful?