Find an API

Search public APIs with auth details & Postman guides

← All APIs

CourtListener API

www.courtlistener.com · Government

Government API Key Free Tier Legal Court Cases Law

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

API Key Free account at courtlistener.com. Get token from your profile. Pass as Authorization: Token YOUR_TOKEN.

Sample Requests

GET Search opinions

Search court opinions mentioning the First Amendment.

https://www.courtlistener.com/api/rest/v4/search?q=first amendment&type=o&order_by=score desc

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
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 Get a court

Get info about the US Supreme Court.

https://www.courtlistener.com/api/rest/v4/courts/scotus

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
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

Get Postman ↗
  1. Create a free account at courtlistener.com
  2. Get your API token from your profile page
  3. Set Authorization: Token YOUR_TOKEN header
  4. Search opinions: GET /search/?q=constitutional+rights&type=o
  5. type: o=opinions, r=RECAP/PACER docs, oa=oral arguments, p=people

Open documentation ↗