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
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
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 | |
min_last_filed_accounts max_last_filed_accounts | Range search on the date the company last filed their accounts in YYYY-MM-DD format | https://api2.redflagalert.net/v4/companies/?min_last_filed_accounts=2020-05-30 | |
has_directorships | Filters companies that have at least one directorship record. | https://api2.redflagalert.net/v4/companies/?has_directorship=true | |
sic_section sic_section_search_type | Filter by the top-level SIC Section to which the company belongs. | https://api2.redflagalert.net/v4/companies/?sic_section=F Returns all construction businesses in the database. Multiple section can be searched, in which case results will containe businesses that have any of the supplied codes: https://api2.redflagalert.net/v4/companies/?sic_section=F,A In order to only get results that match all of the supplied sectors, supply the 'sic_section_search_type' parameter: https://api2.redflagalert.net/v4/companies/?sic_section=F,A&sic_section_type=and | SIC section headings and letter codes given in Appendix 2. Companies may have several SIC sections if they are active in several areas; in this case, if any of the sections match then the company will be returned. |
sic_code sic_code_search primary_sic_code | Filter on the exact SIC codes a company has. | https://api2.redflagalert.net/v4/companies/?sic_code=51519 Returns companies with the SIC code 51519. https://api2.redflagalert.net/v4/companies/?sic_code=51519,51511 Returns companies with the SIC code 51519 or 51511. https://api2.redflagalert.net/v4/companies/?sic_code=51519,51511&sic_code_search_type=and Returns companies with at least the SIC codes 51519 and 51511 assigned. https://api2.redflagalert.net/v4/companies/?primary_sic_code=51519 Returns companies whose primary SIC code is 51519. https://api2.redflagalert.net/v4/companies/?primary_sic_code=51519,51511 Returns companies whose primary SIC code is 51519 or 51511. | You can supply multiple search parameters, comma separated in list. By default, a search on a sic_code will return companies that have any of the listed SIC codes. If you would like to see only companies that have all of the supplied SIC codes, supply the ' sic_code_search_type ' parameter ate to 'and' (if not supplied, defaults to 'or').SIC codes for companies are returned in order of priority, the primary SIC code being the first entry in the list. The primary SIC code itself is a searchable field. Multiple values can be supplied that will match a company that has any one of them as the primary SIC code. Only one value can be present for the 'primary_sic_code' therefore you cannot perform an 'and' search on this field as with 'sic code'. |
rating | The Red Flag Alert credit rating currently assigned to this company. | Returns companies with the specified Red Flag rating e.g: https://api2.redflagalert.net/v4/companies/?rating=bronze Returns companies with a 'Bronze' Red Flag rating.
| |
min_last_updated max_last_updated | Minimum and maximum date filters allowing you to narrow your query down to records updated within a specified time period. | | |
tps_registered | Whether or not the company is registered for the Telephone Preference Service. | | |
filter_name | | | |
company_type | | | |
postcode_area | | | |
county | | | |
town | | | |
country | | | |
telephone_number | | | |
mortgage_type | | | |
mortgage_holder | | | |
min_last_updated | isoformat date | | |
max_last_updated | isoformat date | | |
min_latest_action_date | isoformat date | | |
max_latest_action_data | isoformat date | | |
address_type | "trading" or "registered" | | |
Last modified 2yr ago