Search
The main endpoint for retrieving businesses is /companies/. When called without any parameters, this will return all available businesses in the database.
In order to perform searches, various filters are added to the companies. These can all be combined together; for example, to retrieve all manufacturing (SIC section D) companies near the centre of Oldham the query would be:
https://api2.redflagalert.net/v4/companies/?sic_section=D&postcode=OL11HD&distance=3miles

Results per page

By default a single search response page contains 50 results. This can be overridden by sending the results_per_page parameter as a valid integer:
https://api2.redflagalert.net/v4/companies/?postcode=OL11HD&results_per_page=100

Search Parameters

Various search filters are available and we expect these to be steadily added to as the API develops. If you require a search which is not currently available, please contact us to suggest it.
Search Parameter
Description
Examples
Notes
postcode
Search within a specified radius of a UK postcode.
https://api2.redflagalert.net/v4/companies/?postcode=SW1A%202AA
Returns businesses with postcode SW1A 2AA
Where we have multiple addresses for a business, if any of them match the postcode filter then the business will be included in the search results.
distance
Search within a specified radius of a UK postcode.
https://api2.redflagalert.net/v4/companies/?postcode=SW1A%202AA&distance=3miles
Returns businesses within a 3 mile radius of SW1A 2AA
Where we have multiple addresses for a business, if any of them match the postcode filter then the business will be included in the search results.
has_contact
has_phone_contact
has_email_contact
Filter companies based on available contact information.
https://api2.redflagalert.net/v4/companies/?has_contact=true
Returns companies which have a contact phone number or a contact email address.
https://api2.redflagalert.net/v4/companies/?has_email_contact=true
Returns companies which have a contact email address.
https://api2.redflagalert.net/v4/companies/?has_email_contact=false&has_phone_contact=true
Returns companies with no contact email address but with a contact phone number.
All of these filters take a boolean value; e.g. 'true' or 'false'.
exclude_non_trading
Filter out non-trading companies (rated 'Discontinued', 'Dissolved', 'Not-trading' or 'Strike Off').
https://api2.redflagalert.net/v4/companies/?exclude_non_trading=true
The filter does not return only non trading companies if set to 'false'.
has_filed_accounts
Filter companies with accounting data i.e. who have filed accounts.
https://api2.redflagalert.net/v4/companies/?has_filed_accounts=true
Returns companies which have at least one set of figures for balance sheet, profit and loss, cashflow, or ratio analysis. Setting it to false will only return companies who have none of these data.
is_limited
Filter search results to include/exclude registered/limited companies.
https://api2.redflagalert.net/v4/companies/?is_limited=true
Only returns companies which are registered/limited.
This filter takes a boolean value; e.g. 'true' or 'false'.
match_name
A simple closest text match on the name of the business.
https://api2.redflagalert.net/v4/companies/?match_name=red%20flag%20a!ert%20llp
Will return Red Flag A!ert first, followed by other similar matches.
auditor
Query on the name of the business's auditor
https://api2.redflagalert.net/v4/companies/?auditor=begbies
auditor_match_name_prefix
Match text at the beginning of the business's auditor
https://api2.redflagalert.net/v4/companies/?auditor_match_name_prefix=begbies
match_name_prefix
Also a text match, but focuses on the beginning of the company name.
https://api2.redflagalert.net/v4/companies/?match_name_prefix=red flag
Returns all businesses whose name starts with ‘red flag’.
Most commonly used for autocomplete-style search
min_birthdate
max_birthdate
Earliest and latest birthdays of current directors
https://api2.redflagalert.net/v4/companies/?min_birthdate=1987-01-00&max_birthdate=1987-03-00
Returns all businesses with current directors born in January, February or March 1987.
Exact dates are not available for data protection reasons
min_employees
max_employees
Range search on the reported number of employees for the business.
https://api2.redflagalert.net/v4/companies/?min_employees=5&max_employees=50
Returns all companies with between 5 and 50 employees.
Can specify min or max parameters. To search within a range, specify both.
min_combined_employees
max_combined_employees
Range search across the estimated or actual number of employees, according to availability.
https://api2.redflagalert.net/v4/companies/?min_combined_employees=50&max_combined_employees=100
Returns all companies with between 50 and 100 estimated or actual employees.
min_incorporation_date
max_incorporation_date
Retrieve companies registered in a particular date range.
https://api2.redflagalert.net/v4/companies/?min_incorporation_date=1987-02-09
Return companies established on or after the 9th of February 1987.
https://api2.redflagalert.net/v4/companies/?min_incorporation_date=1977-01-01&max_incorporation_date=1987-12-31
Return companies established between 1977 and 1987.
Supply valid dates in ISO-8601 standard YYYY-MM-DD format. Can specify min or max parameters. To search within a range, specify both.
min_total_assets
max_total_assets
Search on the last available total assets figure.
https://api2.redflagalert.net/v4/companies/?min_total_assets=50000&max_total_assets=10000
Returns companies with most recently reported assets of between £50k and £100k.
Can specify min or max parameters. To search within a range, specify both.
min_turnover
max_turnover
Search on the last available turnover figure for a business.
https://api2.redflagalert.net/v4/companies/?min_turnover=50000&max_turnover=100000
Returns businesses with last reported turnovers of between £50k and £100k.
Can specify min or max parameters. To search within a range, specify both.
min_combined_turnover
max_combined_turnover
Search across the estimated or actual turnover, according to availability.
https://api2.redflagalert.net/v4/companies/?min_combined_turnover=50000&max_combined_turnover=100000
Returns all companies with between 50,000 and 100,000 estimated or actual turnover.
min_credit_limit max_credit_limit
Range search on the credit_limit figure found in the rfa_rating section of a company
https://api2.redflagalert.net/v4/companies/?min_credit_limit=50000&max_credit_limit=100000
min_credit_score max_credit_score
Range search on the credit_score figure found in the rfa_rating section of a company (0 to 100)
https://api2.redflagalert.net/v4/companies/?min_credit_score=75&max_credit_score=90
Copy link
Outline