Recipe: uses the API · Google Sheets
Owner names in Google Sheets, one row per business.
Paste a short Apps Script into your sheet. It sends each business name and address to LocalContact and writes the people who run it back into the row.
Updated
Can I look up business owners from a Google Sheet?
Short answer
Yes. Add our free Apps Script to your sheet, save your LocalContact API key, and choose LocalContact > Start searches. The script sends each row's business name and address to the LocalContact API, then Fetch results writes the names and job titles it found into the row. It needs the Scale plan. Each business searched uses 1 credit.
What you get
A sheet of businesses goes in, and each row comes back with the people who run it:
| Company | Address | LocalContact status | People found |
|---|---|---|---|
| Bramblewood Bakery | 12 Oak St, Austin, TX | Done | Maria Lopez (Owner); Sam Reed (Manager) |
| Ostrander Plumbing | Leeds, UK | Searching |
(Example data: the businesses and people are made up.)
The script works because LocalContact starts from the business name and address, not a website, so rows with no website work too.
1. Set up the sheet
The first row is the header. The script needs two columns:
- Company: the business name, as it appears on its sign or listing.
- Address: the street address, or at least the town and country.
Add a Titles column if you want different job titles per row, separated by commas, for example Owner, Practice manager. Up to 5 titles per row. Without it, the script asks for Owner, Founder and General Manager.
The script adds three columns of its own the first time it runs: LocalContact task, LocalContact status and People found.
2. Add the script
- In your sheet, open Extensions > Apps Script.
- Delete the sample code, then paste the whole script. Download it here or open it in your browser and copy it.
- Click Save, then reload the sheet. A LocalContact menu appears next to Help.
The first time you use the menu, Google asks you to allow the script to connect to an external service. That’s the LocalContact API.
3. Save your API key
API access comes with the Scale plan. In LocalContact, open API and create a key for Google Sheets. Then in the sheet, choose LocalContact > Set API key and paste it. The key is saved in your own Apps Script user properties, never in a cell.
4. Start the searches
Choose LocalContact > Start searches for new rows. For each row with a company and no task id yet, the script sends one request to POST /api/v1/search with the business name, address and titles, and writes the task id it gets back. Rows that already have a task id are skipped, so you never pay twice for the same row.
5. Fetch the results
Searches run in the background. After a short wait, choose LocalContact > Fetch results. For each row still searching, the script asks GET /api/v1/tasks/{id}, and when the search has finished it reads GET /api/v1/tasks/{id}/results and writes the people into People found, as “Name (Job title)” separated by semicolons.
To skip the clicking, choose Fetch results every 10 minutes. It adds a time-driven trigger that runs under your account. Stop fetching automatically removes it.
What the status column means
| Status | What it means |
|---|---|
| Searching | The search started and hasn’t finished yet |
| Done | The results are in People found |
| Search failed | The search couldn’t finish |
| Not enough credits | Buy more credits, then start the searches again |
| API key not accepted | Set the key again; check it hasn’t been turned off |
| A message about the plan | The key’s account needs an active Scale plan |
| Too many requests | Wait and run it again later |
To search a failed row again, clear its task id and status, then start the searches.
Limits to know
- 50 rows per run. Google stops a script run after 6 minutes, so the script handles up to 50 rows each time. Run it again for the next batch.
- Google’s daily quota. Personal Google accounts can make 20,000 URL fetch calls a day and Workspace accounts 100,000, per Google’s quota page. Each row uses one call to start and about two to read.
- LocalContact’s limit. 1,500 API requests per key per hour.
- Big lists. For thousands of rows, a CSV upload in LocalContact is quicker than a script.
See the API docs for every field. Other recipes: Zapier, Make, n8n and Clay.
Questions
Still have questions? Contact us
Is this an official Google Sheets add-on?
No. It's a short script you add to your own sheet. It calls the LocalContact API with your API key, which comes with the Scale plan.
Where is my API key stored?
In your own Apps Script user properties, which only your Google account can read. It isn't written in the sheet, so sharing the sheet doesn't share the key.
What does it cost?
Each business searched uses 1 LocalContact credit, with every person found included. A search that finds no one still uses 1 credit. The script never searches a row twice: rows with a task id are skipped.
How many rows can it do at once?
It handles up to 50 rows each time you run it, to stay inside Google's time limit for a script run. Run it again for the next 50, or upload a CSV in LocalContact for very large lists.
Why does a row say Searching after I fetch?
The search is still running. Searches run in the background, so fetch again a little later, or turn on Fetch results every 10 minutes.
Stop emailing info@. Find who actually decides.
Name and address in. The people who run the business out.