Search for documents across the Better Regulation database using one or more filter parameters. Results are paginated and can be refined by keyword, date, jurisdiction, document type, subject area, and more.
Endpoint
GET https://service.betterregulation.com/api/v1/search?[parameters]&access_token=[your-api-key]&. The example below filters by date range and body text simultaneously.https://service.betterregulation.com/api/v1/search?tm_from=2020-01-01&body=article&access_token=[your-api-key]Parameter reference
All parameters are optional and can be combined freely. The table below is a quick reference — full details and examples for each parameter follow below.
| Parameter | Group | Description |
|---|---|---|
title |
Text search | Search document titles. |
body |
Text search | Search document body text. |
fulltext |
Text search | Search titles and body text together. |
news_date |
Date | Filter by news date (YYYY-MM-DD). |
tm_from |
Date | Time machine date range — start (YYYY-MM-DD). |
tm_to |
Date | Time machine date range — end (YYYY-MM-DD). |
published_date |
Date | Filter by publication year (YYYY). |
subject_area |
Taxonomy | Filter by Document Subject term ID. |
module_area |
Taxonomy | Filter by Document Area term ID. |
page_status |
Taxonomy | Filter by Page Status term ID. |
jurisdiction |
Taxonomy | Filter by Jurisdiction term ID. |
doc_type |
Taxonomy | Filter by Document Type term ID. |
organisation |
Taxonomy | Filter by organisation node ID (NID). |
firm |
Taxonomy | Filter by firm taxonomy ID. |
book_id |
Taxonomy | Filter by book ID — returns all pages within a specific book. |
page |
Pagination | Page number to return (starts at 0). |
items_per_page |
Pagination | Results per page. Default: 20. |
&. The example below filters by date range and body text simultaneously.https://service.betterregulation.com/api/v1/search?tm_from=2020-01-01&body=article&access_token=[your-api-key]Text search
Use these parameters to search document titles and content by keyword or phrase.
title
Searches document titles for the specified phrase.
https://service.betterregulation.com/api/v1/search?title=article&access_token=[your-api-key]body
Searches the full text content of documents for the specified phrase.
https://service.betterregulation.com/api/v1/search?body=article&access_token=[your-api-key]fulltext
Searches both the title and content of documents simultaneously. Use this as a shortcut when you do not need to target one field specifically.
https://service.betterregulation.com/api/v1/search?fulltext=article&access_token=[your-api-key]Date filters
Use these parameters to restrict results to a specific date or date range.
news_date
Filters by the news date field. Date format: YYYY-MM-DD.
https://service.betterregulation.com/api/v1/search?news_date=2020-01-01&access_token=[your-api-key]tm_from and tm_to
Filters by the time machine date range. tm_from sets the start of the range and tm_to sets the end. Either parameter can be used on its own, or both can be combined. Date format: YYYY-MM-DD.
https://service.betterregulation.com/api/v1/search?tm_from=2020-01-01&tm_to=2022-12-31&access_token=[your-api-key]published_date
Filters by the year the document was originally published. Accepts a four-digit year.
https://service.betterregulation.com/api/v1/search?published_date=2022&access_token=[your-api-key]Taxonomy filters
These parameters filter by classification. Each accepts a numeric term ID. For a full list of valid term IDs, see the Search Term IDs page.
{"tid": "name"} objects — for example, {"118": "Capital Requirements"}. You can use a known document response to identify the term IDs you need.subject_area
Filters by Document Subject taxonomy ID.
https://service.betterregulation.com/api/v1/search?subject_area=118&access_token=[your-api-key]module_area
Filters by Document Area taxonomy ID.
https://service.betterregulation.com/api/v1/search?module_area=84&access_token=[your-api-key]page_status
Filters by Page Status taxonomy ID (e.g. In force, Repealed).
https://service.betterregulation.com/api/v1/search?page_status=562&access_token=[your-api-key]jurisdiction
Filters by Document Jurisdiction taxonomy ID.
https://service.betterregulation.com/api/v1/search?jurisdiction=30&access_token=[your-api-key]doc_type
Filters by Document Type taxonomy ID.
https://service.betterregulation.com/api/v1/search?doc_type=235&access_token=[your-api-key]organisation
Filters by the publishing organisation, identified by its node ID (NID). Node IDs can be found in document responses via the field_doc_organisation field.
https://service.betterregulation.com/api/v1/search?organisation=357&access_token=[your-api-key]firm
Filters by firm taxonomy ID.
https://service.betterregulation.com/api/v1/search?firm=538&access_token=[your-api-key]book_id
Filters results to all pages within a specific book. A book is a structured, multi-page document — such as a piece of legislation or a rulebook — where one page acts as the root (contents page) and all other pages sit beneath it in a hierarchy.
The book ID is the ID number of the root page. You can find it by navigating to the contents page of the relevant document in the Better Regulation service and noting the ID in the URL.
https://service.betterregulation.com/api/v1/search?book_id=38001&access_token=[your-api-key]book_id when you need all pages from one specific document rather than a broad search. It is particularly useful for extracting the full contents of a piece of legislation or a multi-part regulatory framework.Pagination
Search results are paginated. By default, 20 results are returned per page starting from page 0.
page
Specifies which page of results to return. Page numbering starts at 0.
https://service.betterregulation.com/api/v1/search?page=2&access_token=[your-api-key]items_per_page
Sets the number of results returned per page. Accepted values: 1, 5, 10, 20, 30, 40, 50, 100.
https://service.betterregulation.com/api/v1/search?items_per_page=50&access_token=[your-api-key]Pagination parameters can be combined with any filter. The example below returns page 2 with 50 results per page.
https://service.betterregulation.com/api/v1/search?page=2&items_per_page=50&access_token=[your-api-key]