Coming soon to the Google Workspace Marketplace

Facebook and Instagram data in Google Sheets

SocialAPIs (socialapis.io) is a public Facebook and Instagram data API. The Sheets add-on turns it into formulas: Page followers, Instagram profiles and posts, Meta Ads Library ads, one cell at a time.

Install

Set it up in a minute

  1. 1The add-on is coming soon to the Google Workspace Marketplace. Sign up now and your key will be ready when it's listed.
  2. 2Create a free account and copy your API key from the dashboard (200 calls a month, no card).
  3. 3In Sheets, open Extensions → SocialAPIs → Set API key, paste the key and select Check and save. The check uses the free /usage endpoint.
  4. 4Type a formula such as =SOCIALAPIS_FB_PAGE("nasa", "followers"), or use Extensions → SocialAPIs → Insert example sheet.

Reference

Functions

Each formula is one API call. Calls that return data are charged, including empty results; errors (4xx/5xx) are not charged. Results are cached for 10 minutes, so recalculating a sheet doesn't spend credits again. In a sheet set to French, German, Spanish and many other languages, separate arguments with ; instead of ,: =SOCIALAPIS_FB_PAGE("nasa"; "followers").
=SOCIALAPIS_FB_PAGE(link, [field], [exact])1 (5 with exact TRUE) credit · GET /facebook/pages/details

One field (name, followers, followers_display, likes, likes_display, category, verified, url, ad_page_id, image), or every field as a 2-row table when field is empty. Big Pages show a rounded follower count (e.g. 28M); add TRUE for the exact number.

=SOCIALAPIS_FB_PAGE_ID(link)1 credit · GET /facebook/pages/id

The numeric Page ID, as text.

=SOCIALAPIS_IG_PROFILE(username, [field])1 credit · GET /instagram/profile/details

One field (username, full_name, followers, following, posts, bio, verified, private, category, url), or every field as a 2-row table.

=SOCIALAPIS_IG_POSTS(username)1 credit · GET /instagram/profile/posts

One row per post of the first page: post_url, shortcode, type, likes, views, owner, counts_hidden.

=SOCIALAPIS_FB_ADS(keywordOrAdPageId, [country])1 credit · GET /facebook/ads/search

Active ads in the Meta Ads Library, one row per ad: advertiser, headline, text, call to action, platforms, start date, landing domain, Ads Library link.

=SOCIALAPIS_FB_POSTS(link, [limit])1 for 3 posts credit · GET /facebook/pages/posts

The Page's latest posts, one row per post, with the API's own fields as columns. limit 3 to 9 (5-7 posts = 2 credits, 8-9 = 3).

=SOCIALAPIS(endpoint, [params])the endpoint's credit · GET any endpoint

Any SocialAPIs endpoint as a table, e.g. =SOCIALAPIS("/facebook/search/pages", "query=coffee shop&limit=5"). Every endpoint in the API reference works.

=SOCIALAPIS_USAGE([field])free · GET /usage

Credits left (default), credits used, usage %, plan, reset date.

link takes a Page URL or username (nasa, facebook.com/nasa). For ads, a keyword searches active ads in a country (default US); a numeric ad_page_id (from =SOCIALAPIS_FB_PAGE(link, "ad_page_id")) lists one Page's ads. Lists return the first page of results. Endpoint details: API reference.

Example

Track competitor Pages

Put Page links in column A and the formulas next to them. Fill down for as many Pages as you track.
ABC
1PageFollowersCategory
2https://www.facebook.com/nasa=SOCIALAPIS_FB_PAGE(A2, "followers")=SOCIALAPIS_FB_PAGE(A2, "category")
3https://www.facebook.com/spacex=SOCIALAPIS_FB_PAGE(A3, "followers")=SOCIALAPIS_FB_PAGE(A3, "category")

Two fields of the same Page share one cached call when one finishes before the other starts, so this sheet costs 2 to 4 credits the first time, then nothing for 10 minutes.

Your key

Where the API key goes

  • Stored in your Google account's properties for the add-on, shown back only as its last 4 characters.
  • Sent only to https://api.socialapis.io in the x-api-token header, never in a URL or a cell.
  • In a shared spreadsheet, formulas use the key of the spreadsheet's owner (a Google rule for custom functions). Anyone who can edit the sheet can add formulas that spend the owner's credits.

Pricing

Same credits as the API

The free plan has 200 calls a month, no card. Paid plans start at $4.99 a month for 1,500 calls. All plans

Get your API key

200 free calls a month, no card. The same key works in Sheets, the SDKs, n8n and MCP.