Skip to main content
This page shows tested Business Search requests for prospecting and hiring questions: Every request reads the API key from the BRIGHTDATA_API_KEY environment variable, as set in Step 1 of the quickstart. Your records and matched counts will differ from the sample responses, because results move between runs.

How to find companies by office location instead of headquarters

To find software companies with an office in Germany, wherever they are headquartered, filter on offices_country_codes rather than headquarters_country_code. The field is an array of country codes and takes in, so one condition matches every company with an office in any listed country. Instant and Smart take the same intent as a sentence.
A Ludicrous request combines software in the industry with DE in the office country codes. The text condition sets mode: "all": in testing, the default mode reached only a small share of the matching companies, and a different share on each run:Sample request
Sample responseThe first of the three returned records:

How to match a phrase in company descriptions or specialties

To find fraud-detection software providers with an office in the United Kingdom, match the words in the text a company writes about itself. fraud detection software can appear in about or in specialties, so the structured query checks both with or, and mode: "all" requires all three words in the same field. This is a word match, not proof that the company sells fraud detection: a company can describe fraud detection work without offering it as a product.
A Ludicrous request accepts either field and requires a GB office:Sample request
Sample responseThe first of the three returned records:

How to find people by a past employer

To find US engineering managers who used to work at Microsoft and have since moved on, combine a text condition on past_company_names with a not condition on current_company_name. Send this one as a structured query: in testing, the sentence form found former Microsoft employees but did not exclude people who still work there. past_company_names lists employers without dates, so the result shows that the person worked at Microsoft, not when. Both employer conditions set mode: "all", as the office location recipe does. The not condition excludes profiles whose current employer is still Microsoft: Sample request
Sample response The first of the three returned records:
A question that mixes company and people conditions needs more than one Business Search request. A people search filters only on the people searchable fields, such as current_title and current_company_name. A company search filters on the company searchable fields, such as funding and headquarters. A people record can return current_company_funding_raised in its view, but a people search cannot filter on it. Run the search in three steps:
  1. Run a company search for the company conditions and collect the company names.
  2. Run a people search for the people conditions, limited to those company names.
  3. Keep only the profiles whose current employer is one of the companies from step 1.
The example below finds the CEOs of technology companies headquartered in San Francisco whose latest funding round was 1 USD to 2 million USD.

Prerequisites

  • A Bright Data API key with Business Search access, stored in the BRIGHTDATA_API_KEY environment variable. See Business Search quickstart
  • For the Python tab, Python 3 with the requests package. For the Node.js tab, Node.js 18 or later

Step 1: Find the companies

Send the company half of the question as a sentence in Instant mode. The view asks for name, which steps 2 and 3 use to match people to companies, and for headquarters_city and funding_raised, so you can check each company against the question:
Instant can return companies headquartered outside San Francisco, so the Python and Node.js code keep only companies whose headquarters_city contains San Francisco. Instant returns up to the first 100 matches. For a shorter list ranked by how well each company answers the sentence, send the same body with "mode": "smart" and "limit": 10. Smart costs more per search. See Business Search pricing.

Step 2: Search for people at those companies

Send people searches in Ludicrous mode, because the input is now a list of company names from step 1 rather than a sentence. Each request combines the people condition, a CEO title in this example, with up to 10 company names, as or conditions on current_company_name:
The Python and Node.js code send one request per batch of 10 names and key the results on bright_id, so a profile returned by two batches is kept once. In the cURL tab, replace COMPANY_NAME_1 and COMPANY_NAME_2 with company names from step 1, and add one condition per name. Each request is a separate billed search, so 100 companies cost 11 searches in total.

Step 3: Keep the profiles whose company matches

Keep only the profiles whose current_company_name is exactly one of the names from step 1. With cURL, compare the two values in the step 1 and step 2 responses:
The step 2 search is not enough on its own. current_company_name is a text field, so a condition matches every profile whose company name contains the words: Acme also matches Acme Robotics. Comparing the full name drops those profiles, and drops profiles with no current_company_name. The two searches share no identifier: a company record’s company_id and a people record’s current_company_id are different values, so the name is the only field both sides return. Review the list before you use it. The text condition on current_title also matches titles that only contain CEO, such as Assistant to CEO. A company name can also belong to more than one company, and matching on the name cannot tell them apart.