// Google Sheets

LinkedIn scraper for Google Sheets

Two ways to turn a column of LinkedIn URLs into names, titles, companies and more: a formula for small sheets, and a file upload for thousands of rows.

=ENRICHGRID(A2)One formula per row.
Bulk uploadUp to 10,000 rows per file.
Row order keptResults line up with your rows.
Misses are freeNot found = no charge.

Option 1: a formula for small sheets

  1. Open your sheet → Extensions → Apps Script.
  2. Delete what's there, paste the code below, put your API key in the first line and click Save. Your key is on the API keys page.
  3. In any cell: =ENRICHGRID(A2) fills name, title, company, location and country across 5 columns. One field only: =ENRICHGRID(A2, "current_title").
const ENRICHGRID_KEY = "YOUR_API_KEY";

/**
 * Enrich a LinkedIn profile URL with EnrichGrid.
 * @param {string} url LinkedIn profile URL or slug
 * @param {string} field optional single field, e.g. "current_title"
 * @customfunction
 */
function ENRICHGRID(url, field) {
  if (!url) return "";
  const cache = CacheService.getScriptCache();
  const key = "eg:" + url;
  let data = cache.get(key) ? JSON.parse(cache.get(key)) : null;
  if (!data) {
    const res = UrlFetchApp.fetch("https://enrichgrid.com/v1/enrich/person", {
      method: "post", contentType: "application/json", muteHttpExceptions: true,
      headers: { "x-api-key": ENRICHGRID_KEY },
      payload: JSON.stringify({ identifier: String(url) }),
    });
    data = JSON.parse(res.getContentText());
    if (res.getResponseCode() === 202) return "pending, refresh in a minute";
    if (res.getResponseCode() >= 400) return "error: " + (data.detail && data.detail.message || res.getResponseCode());
    cache.put(key, JSON.stringify(data), 21600); // 6 h: recalculating the sheet costs no credits
  }
  if (!data.found) return "not found";
  const p = data.profile;
  if (field) return p[field] === undefined ? "" : p[field];
  return [[p.first_name + " " + p.last_name, p.current_title, p.current_company_name, p.location, p.location_country]];
}

A rare slow profile shows pending, refresh in a minute: Google Sheets gives a formula about 30 seconds, so edit the cell again a minute later and the finished profile comes back.

Freeze the results

Formulas recalculate. The script keeps each result for 6 hours, so recalculations in that window are free; after that a recalculation looks the profile up again and a found profile costs 1 credit. When the column is done, copy it and use Paste special → Values only to keep the data and stop further lookups.

Option 2: thousands of rows

For big lists a formula is slow, so upload the file instead:

  1. In Sheets: File → Download → Microsoft Excel (.xlsx) or CSV.
  2. Upload it on the Bulk enrich page (up to 10,000 rows and 5 MB per file). The LinkedIn URL column is detected automatically.
  3. Download the result and open it with File → Import. Your original columns stay in the same order, followed by an enrichgrid_status column (found, not_found or error) and the profile fields.

Rows that aren't found are free. If your credits run out mid-file, the job pauses; top up and press Resume.

Which fields can I pull?

Any profile field works as the second argument, for example headline, current_title, current_company_name, seniority, job_function, industry, location, location_country, num_connections and follower_count. The full list is in the API reference.

Keep your API key safe

The key lives in the script, and anyone who can edit the sheet can open Apps Script and see it. For a shared sheet, create a separate key and revoke it on the API keys page when you're done.

// FAQ

Questions, answered

Does recalculating the sheet cost credits?

Not within 6 hours of a lookup: the script keeps the result. After that a recalculation looks the profile up again (1 credit if found). Paste the column as values to freeze it.

What happens with profiles that don't exist?

The cell shows "not found" and nothing is charged.

Can I enrich companies in Sheets?

The formula and bulk upload are for people. For companies, call POST /v1/enrich/company from the API.

Start enriching in the next 60 seconds

50 free credits. No credit card. Pay only for what we find.

Create a free account →
Questions? Ask us 👋