Case Text Search
Get cases by full-text search (string).
GET https://clearinghouse.net/api/v2p1/cases/?text=search_string
Headers
Authorization*
String
Authorization
Token XXXXXXXXXXX
where
XXXXXXXXXXX
is the token string
\\ No results
\\ Example query endpoint: /api/v2p1/cases/?text=zzznomatch
["No results for {'text': 'zzznomatch'}"]
\\ Key not found
\\ Example query endpoint: /api/v2p1/cases?test_key=1
["API Error: Key: test_key, Value: 1 not found."]{
"detail":"Authentication credentials were not provided."
}Returns all cases that have at least one document matching the search query. Note: this search uses the same index as the Document text search. Searching cases by text returns cases that have at least one document matching the query. Search is powered by PostgreSQL full-text search and runs across the following fields, in descending order of relevance weight:
Case name
A (highest)
Document title
B
Case summary
C
Document text
D (lowest)
Queries are matched using PostgreSQL's SearchQuery, which supports natural language stemming (e.g. "running" matches "run"). Multi-word queries are treated as AND by default — all terms must appear somewhere across the searched fields.
Example
https://clearinghouse.net/api/v2p1/cases?text=solitary+confinementimport requests
url = "https://clearinghouse.net/api/v2p1/cases?text=solitary+confinement"
headers = { 'Authorization': 'Token XXXXXXXXXX',
'User-Agent': 'Chrome v22.2 Linux Ubuntu'
}
response = requests.request("GET", url, headers=headers, data={})
print(response.text)Last updated