Instagram data in Google Sheets
Track follower counts and post performance for any public Instagram account right inside a spreadsheet. Paste one Apps Script, use it like a formula, and schedule a daily snapshot. No add-on, no connected accounts.
50 free credits on signup · no card required
curl "https://api.profilequery.com/v1/profile?handle=nike" \
-H "Authorization: Bearer $PROFILEQUERY_KEY"What you get
Structured JSON, not raw HTML
- ▹Custom formulas: =INSTAGRAM_FOLLOWERS("nike") and =INSTAGRAM_PROFILE("nike")
- ▹Any public account, including competitors and creators you don't manage
- ▹Daily snapshot trigger that appends one row per account for growth charts
- ▹Recent posts with likes, comments, and views for engagement tracking
- ▹Your API key stays in Script Properties, not in a cell
- ▹Pay per lookup: tracking 50 accounts daily costs a few dollars a month
Step by step
Connect Instagram to Google Sheets
1. Add the script
In your sheet open Extensions → Apps Script, paste the code below, then go to Project Settings → Script Properties and add PROFILEQUERY_KEY with your API key.
const API = "https://api.profilequery.com/v1";
function ig_(path, params) {
const key = PropertiesService.getScriptProperties().getProperty("PROFILEQUERY_KEY");
const qs = Object.entries(params).map(([k, v]) => k + "=" + encodeURIComponent(v)).join("&");
const res = UrlFetchApp.fetch(API + "/" + path + "?" + qs, {
headers: { Authorization: "Bearer " + key },
muteHttpExceptions: true,
});
const body = JSON.parse(res.getContentText());
if (body.error) throw new Error(body.error.message);
return body.data;
}
/** =INSTAGRAM_FOLLOWERS("nike") @customfunction */
function INSTAGRAM_FOLLOWERS(handle) {
return ig_("profile", { handle: handle }).followers;
}
/** =INSTAGRAM_PROFILE("nike") → username, name, followers, following, posts, verified @customfunction */
function INSTAGRAM_PROFILE(handle) {
const p = ig_("profile", { handle: handle });
return [[p.username, p.full_name, p.followers, p.following, p.posts, p.is_verified]];
}2. Use it like a formula
Type =INSTAGRAM_FOLLOWERS(A2) next to a column of usernames. Sheets caches custom-function results, so each cell costs one credit when it recalculates, not on every view.
3. Take a daily snapshot
For growth charts, append a dated row per account each day. Put usernames in column A of a sheet named Accounts, run setup() once, and a trigger does the rest.
function snapshot() {
const ss = SpreadsheetApp.getActive();
const handles = ss.getSheetByName("Accounts").getRange("A2:A").getValues().flat().filter(String);
const out = ss.getSheetByName("History") || ss.insertSheet("History");
const today = new Date();
handles.forEach((h) => {
const p = ig_("profile", { handle: h });
out.appendRow([today, p.username, p.followers, p.following, p.posts]);
});
}
function setup() {
ScriptApp.newTrigger("snapshot").timeBased().everyDays(1).atHour(6).create();
}Endpoints
Every endpoint behind this page
Example response
What comes back
{
"data": {
"id": "13460080",
"username": "nike",
"full_name": "Nike",
"biography": "Just Do It.",
"is_verified": true,
"is_private": false,
"is_business": true,
"category": null,
"followers": 291952375,
"following": 264,
"posts": 1657,
"external_url": "http://empli.fi/nike",
"profile_pic_url": "https://instagram.com/.../nike.jpg",
"public_email": null,
"public_phone_number": null
}
}Response fields
Fields returned by GET /v1/profile
| Field | Description |
|---|---|
| id | Numeric account id (stable even if the username changes). |
| username | The account's @handle. |
| full_name | Display name shown on the profile. |
| biography | The profile's bio text. |
| is_verified | Whether the account has a verified badge. |
| is_private | Whether the account is private. |
| is_business | Whether this is a business/professional account. |
| category | Business category label when set (e.g. "Sportswear"); null otherwise. |
| followers | Number of accounts following this account. |
| following | Number of accounts this account follows. |
| posts | Total number of posts on the profile. |
| external_url | The clickable link in the bio, if any. |
| profile_pic_url | URL of the account's profile picture. |
| public_email | Public contact email, if the account exposes one; null otherwise. |
| public_phone_number | Public contact phone number, if exposed; null otherwise. |
No login required
Nothing to authenticate but your API key
No OAuth flow
One static API key in an Authorization: Bearer header. No redirect, no refresh tokens, no expiring session.
No Meta app review
Never touch Meta's developer platform, Business Verification, or a connected Facebook Page. Sign up directly with Profile Query.
Public data only
Every endpoint returns only what's already visible on Instagram without logging in. Private accounts are never accessible.
Pricing
1 credit per request. Credits start at $8.00 per 1,000 and drop to $6.00 per 1,000 at volume — no subscription, no minimums. New accounts get 50 free credits.
See full pricingFAQ
Instagram data in Google Sheets, explained
Can I get Instagram follower counts into Google Sheets for free?
Every new account gets 50 free credits, and a follower-count lookup is 1 credit. After that, credits start at $8.00 per 1,000 lookups with no subscription.
Do I need to connect my Instagram account?
No. This reads public data only, so there's no Instagram login or Meta app. It works for any public account, not just yours.
Why use Apps Script instead of IMPORTXML?
Instagram pages are rendered with JavaScript and block anonymous scraping, so IMPORTXML returns nothing or errors. An API call returns clean JSON reliably.
Related
More ways to pull Instagram data
Start pulling google sheets data
Create a free key and make your first request in under a minute — 50 credits on us.