curl --request GET \
--url https://api.casebyte.ai/v1/cases/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.casebyte.ai/v1/cases/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casebyte.ai/v1/cases/{id}")
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{
"case_id": "HKCFA_2021_12",
"case_name": "Kwok Cheuk Kin v Director of Lands",
"court": "HKCFA",
"neutral_citation": "[2021] HKCFA 12",
"action_numbers": [
"FACV 4/2020"
],
"publish_date": "2021-04-21",
"case_url": "https://www.hklii.hk/eng/hk/cases/hkcfa/2021/12.html",
"doc_text": "JUDGMENT\n\n1. This appeal raises...",
"matched_by": "case_id"
}Get Case Judgment
Look up a case by canonical case_id (e.g. HKCFA_2023_5), neutral citation (e.g. [2023] HKCFA 5), or action number (e.g. FACV 5/2022 or FACV5/2022 — the space is optional). The API tries each format in order and returns the first match. The matched_by field in the response tells you which form was used. See the identifiers guide for details on each format and URL-encoding.
curl --request GET \
--url https://api.casebyte.ai/v1/cases/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.casebyte.ai/v1/cases/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casebyte.ai/v1/cases/{id}")
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{
"case_id": "HKCFA_2021_12",
"case_name": "Kwok Cheuk Kin v Director of Lands",
"court": "HKCFA",
"neutral_citation": "[2021] HKCFA 12",
"action_numbers": [
"FACV 4/2020"
],
"publish_date": "2021-04-21",
"case_url": "https://www.hklii.hk/eng/hk/cases/hkcfa/2021/12.html",
"doc_text": "JUDGMENT\n\n1. This appeal raises...",
"matched_by": "case_id"
}Authorizations
Casebyte API key, prefixed with cb_live_. Generate one from your casebyte.ai dashboard.
Path Parameters
Case identifier — case ID, neutral citation, or action number. URL-encode reserved characters ([, ], /, space).
Response
Case found.
"HKCFA_2021_12"
Which identifier form matched the supplied id.
case_id, neutral_citation, action_number All action numbers associated with this case (e.g. consolidated appeals).
URL of the original judgment on the source publisher (judiciary.hk or HKLII).
Full plain-text judgment. May be very large (up to several MB).