- Find companies by office location instead of headquarters, with
inonoffices_country_codes - Match a phrase in company descriptions or specialties, with
orandmode: "all" - Find people by a past employer, with
past_company_namesandnot - Run a multi-step search, a company search followed by a people search
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 onoffices_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.
- Ludicrous
- Instant
- Smart
A Ludicrous request combines Sample responseThe first of the three returned records:
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 requestHow 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.
- Ludicrous
- Smart
A Ludicrous request accepts either field and requires a GB office:Sample requestSample 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 atext 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
How to run a multi-step search
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 ascurrent_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:
- Run a company search for the company conditions and collect the company names.
- Run a people search for the people conditions, limited to those company names.
- Keep only the profiles whose current employer is one of the companies from step 1.
Prerequisites
- A Bright Data API key with Business Search access, stored in the
BRIGHTDATA_API_KEYenvironment variable. See Business Search quickstart - For the Python tab, Python 3 with the
requestspackage. 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 forname, 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:
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, asor conditions on current_company_name:
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 whosecurrent_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:
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.