If you’re interested in how the client-side interface talks to the server-side API, and in addressing and re-using Old Bailey data directly, the easiest approach is to explore the Query URL and Zip URL links. But details of the server-side search and retrieval functions are also available at the following URLs:
This servlet receives search terms and additional instructions as HTML parameters. It returns either a JSON object representing a result set, or a ZIP file of texts from the result set.
Search terms are specified as follows:
- term[term number]=[field]_[term]
Results are paged as follows:
- start=[result to start from]
- count=[number of results to return]
It is a good idea always to specify a “count” parameter, as the default is all results.
If you would like the returned JSON object to include a frequency table of terms in the results, you can specify the field you would like to examine:
If you would like the full text of the results returned in a zip file, you can specify:
will return a JSON object representing a result set where every trial contains the term “sheffield”, and an offence category of “deception”. The object will also offer a frequency table of offence subcategories within this result set. The hit list returned will start at the first result and continue for ten results.
will perform the same search as above, but return a zip file containing the first ten trials of the result set. The “breakdown” parameter is ignored in this case.
There are some caveats. The servlet will not return lists of more than 1000 IDs, or zip files of more than 50 trials. Frequency tables of terms are also curtailed (and inaccurate) if they contain more than 1000 distinct terms.
This servlet receives the ID of a single trial, and optionally a list of words to highlight as HTML parameters. It returns the XML of the requested trial.
- id=[trial id]
- highlightTerms=[terms to highlight]
will return the XML of the trial t17690112-9, with <span> tags around the words “sheffield” and “fraud”.