CourtListener API
www.courtlistener.com · Government
9M+ court decisions from 2,000+ US courts — search case law, judges, oral arguments, financial disclosures, and PACER documents. Free tier with CourtListener account.
Authentication
Sample Requests
Search court opinions mentioning the First Amendment.
Hover any highlighted part to learn what it does
| Authorization | Token YOUR_TOKEN |
curl -X GET "https://www.courtlistener.com/api/rest/v4/search/?q=first%20amendment&type=o&order_by=score%20desc" \ -H "Authorization: Token YOUR_TOKEN"
import requests
params = {
"q": "first amendment",
"type": "o",
"order_by": "score desc"
}
headers = {
"Authorization": "Token YOUR_TOKEN"
}
response = requests.get(
"https://www.courtlistener.com/api/rest/v4/search/",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://www.courtlistener.com/api/rest/v4/search/');
url.searchParams.set('q', 'first amendment');
url.searchParams.set('type', 'o');
url.searchParams.set('order_by', 'score desc');
const response = await fetch(url, {
headers: {
'Authorization': 'Token YOUR_TOKEN'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://www.courtlistener.com/api/rest/v4/search/")
q := baseURL.Query()
q.Set("q", "first amendment")
q.Set("type", "o")
q.Set("order_by", "score desc")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Authorization", "Token YOUR_TOKEN")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.courtlistener.com/api/rest/v4/search/")
uri.query = URI.encode_www_form({
"q" => "first amendment",
"type" => "o",
"order_by" => "score desc"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Token YOUR_TOKEN"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.courtlistener.com/api/rest/v4/search/?" . http_build_query([
"q" => "first amendment",
"type" => "o",
"order_by" => "score desc"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Authorization: Token YOUR_TOKEN"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get info about the US Supreme Court.
Hover any highlighted part to learn what it does
| Authorization | Token YOUR_TOKEN |
curl -X GET "https://www.courtlistener.com/api/rest/v4/courts/scotus/" \ -H "Authorization: Token YOUR_TOKEN"
import requests
headers = {
"Authorization": "Token YOUR_TOKEN"
}
response = requests.get(
"https://www.courtlistener.com/api/rest/v4/courts/scotus/",
headers=headers,
)
print(response.json())const url = 'https://www.courtlistener.com/api/rest/v4/courts/scotus/';
const response = await fetch(url, {
headers: {
'Authorization': 'Token YOUR_TOKEN'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://www.courtlistener.com/api/rest/v4/courts/scotus/"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Authorization", "Token YOUR_TOKEN")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.courtlistener.com/api/rest/v4/courts/scotus/")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Token YOUR_TOKEN"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.courtlistener.com/api/rest/v4/courts/scotus/";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Authorization: Token YOUR_TOKEN"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Create a free account at courtlistener.com
- Get your API token from your profile page
- Set Authorization: Token YOUR_TOKEN header
- Search opinions: GET /search/?q=constitutional+rights&type=o
- type: o=opinions, r=RECAP/PACER docs, oa=oral arguments, p=people
What can you build with CourtListener API?
CourtListener API is a Government API. Developers commonly use government APIs for:
- surfacing public datasets in citizen-facing apps
- building transparency and civic engagement tools
- accessing legislation, court records, and official data
- powering research and journalism tools
- creating compliance and regulatory monitoring dashboards
API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. CourtListener API is free to use up to a usage limit, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide