curl --request GET \
--url https://api.casebyte.ai/v1/cases/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casebyte.ai/v1/cases/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_bodySearch Cases
Boolean / phrase / fuzzy search across the Hong Kong case-law corpus. The q parameter accepts plain words, exact phrases (wrap in "..."), or boolean queries (use AND / OR / NOT). See the search syntax guide for details.
curl --request GET \
--url https://api.casebyte.ai/v1/cases/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/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.casebyte.ai/v1/cases/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casebyte.ai/v1/cases/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_bodyAuthorizations
Casebyte API key, prefixed with cb_live_. Generate one from your casebyte.ai dashboard.
Query Parameters
Search query. Supports plain words, "phrases", and AND/OR/NOT booleans.
1Which fields to search.
all, case_name, judgment Comma-separated list of HK court codes to filter by (e.g. HKCFA,HKCA). Case-insensitive on input. Unknown codes return 400 invalid_court.
^(HKCFA|HKCA|HKCFI|HKDC|HKMAGC|HKFC|HKLDT|HKLAT|HKSCT|HKOAT|HKCT|HKCRC)(,(HKCFA|HKCA|HKCFI|HKDC|HKMAGC|HKFC|HKLDT|HKLAT|HKSCT|HKOAT|HKCT|HKCRC))*$Inclusive lower bound for publish_date. Must be YYYY-MM-DD.
Inclusive upper bound for publish_date. Must be YYYY-MM-DD. Must be on or after start.
Sort order for publish_date.
asc, desc Page size.
1 <= x <= 100Number of results to skip. offset + limit must be ≤ 10,000.
0 <= x <= 10000Response
Search results.