Skip to main content

API get search

Get search results

This endpoint allows you to search for documents by parameters.

https://service.betterregulation.com/api/v1/

Filters

Every (parameter) can be used after another by using & sign.

https://service.betterregulation.com/api/v1/search?tm_from=2020-01-01&body=article&access_token=[your-api-key]

Title
- Parameter 'title' - search by phrase “article”

https://service.betterregulation.com/api/v1/search?title=article&access_token=[your-api-key]

Body
Parameter 'body' - search the content of the document by phrase “article”

https://service.betterregulation.com/api/v1/search?body=article&access_token=[your-api-key]

Body and title together
- Parameter 'fulltext' - search in the title and content of the document by phrase “article”

https://service.betterregulation.com/api/v1/search?fulltext=article&access_token=[your-api-key]

News date
- Parameter 'news_date' - date format Y-m-d

https://service.betterregulation.com/api/v1/search?news_date=2020-01-01&access_token=[your-api-key]

Date from/to
- Parameters 'tm_from' & 'tm_to' with the date format Y-m-d
Where tm_from is the lower limit and tm_to is the upper limit of the time machine field.

https://service.betterregulation.com/api/v1/search?tm_from=2020-01-01&tm_to=2022-12-31&access_token=[your-api-key]

Published year
- Parameter 'published_date' - search by year

https://service.betterregulation.com/api/v1/search?published_date=2022&access_token=[your-api-key]

Subject area
- Parameter 'subject_area' - search by taxonomy id - Document Subject

https://service.betterregulation.com/api/v1/search?subject_area=118&access_token=[your-api-key]

Module area
- Parameter 'module_area' - document area - search by taxonomy id - Document Area

https://service.betterregulation.com/api/v1/search?module_area=84&access_token=[your-api-key]

Page status
- Parameter 'page_status' - search by taxonomy id - Page Status

https://service.betterregulation.com/api/v1/search?page_status=554&access_token=[your-api-key]

Document Jurisdiction
- Parameter 'jurisdiction' - search by taxonomy id - Document Jurisdiction

https://service.betterregulation.com/api/v1/search?jurisdiction=6&access_token=[your-api-key]

Document type
- Parameter 'doc_type' - search by taxonomy id - Document Type

https://service.betterregulation.com/api/v1/search?doc_type=235&access_token=[your-api-key]

Organisation
- Parameter 'organisation' - search by NID

https://service.betterregulation.com/api/v1/search?organisation=357&access_token=[your-api-key]

Firm
- Parameter 'firm' - search by taxonomy id

https://service.betterregulation.com/api/v1/search?firm=538&access_token=[your-api-key]

 

Pagination

By default, 20 items are displayed per page.

Pager
You can get more elements by getting to the next page, in this case you have to use page parameter.

https://service.betterregulation.com/api/v1/search?page=2&access_token=[your-api-key]

Items per page
You can also change the number of displayed results with items_per_page parameter.

https://service.betterregulation.com/api/v1/search?items_per_page=50&access_token=[your-api-key]

You have to use the number from the list: 1, 5, 10, 20, 30, 40, 50, 100
In other case default number will be loaded.

http://service.betterregulation.com/api/v1/search?page=2&items_per_page=50&access_token=[your-api-key]