Reads a public Instagram profile's own metadata and newest posts (instagram.com) — bio, follower/following counts, and the latest posts' captions, like…
Reads a public Instagram profile's own metadata and newest posts (instagram.com) — bio, follower/following counts, and the latest posts' captions, like and comment counts, off the site's own logged-out profile-info endpoint.
Domain: instagram.com
Also known as: Instagram, instagram, instagram.com
Call it directly
bowmark.providers.instagram.getProfile(username: string): Promise<InstagramProfile>
bowmark.providers.instagram.getPosts(username: string): Promise<InstagramPost[]>Functions
| Function | What it does |
|---|---|
getProfile | Reads one public Instagram profile's own metadata — full name, biography, external link, verified/private flags, follower and following counts, and total post count. |
getPosts | Reads the most recent posts (up to 12, newest first) on one public Instagram profile — shortcode, permalink, image/video flag, caption, like count, comment count and timestamp. |
Types
interface InstagramProfile {
id: string;
username: string;
fullName: string;
biography: string;
externalUrl: string | null;
isPrivate: boolean;
isVerified: boolean;
profilePicUrl: string;
followerCount: number;
followingCount: number;
postCount: number;
}
interface InstagramPost {
id: string;
shortcode: string;
permalink: string;
isVideo: boolean;
displayUrl: string;
caption: string | null;
likeCount: number;
commentCount: number;
takenAt: string;
}Examples
// who is this account and how big is it?
const profile = await bowmark.providers.instagram.getProfile("nasa");
log(`${profile.fullName}: ${profile.followerCount.toLocaleString()} followers`);// their newest posts, with engagement
const posts = await bowmark.providers.instagram.getPosts("nasa");
log(posts.map(p => `${p.shortcode}: ${p.likeCount} likes, ${p.commentCount} comments`).join("\n"));