How to fetch Instagram Business account followers count using Meta Graph API?
I’m trying to get the followers count of an Instagram Business account linked to my Facebook page. I generated the access token and can fetch page data, but the response doesn’t include Instagram metrics.
This is the request I tried:
https://graph.facebook.com/v17.0/{page_id}?fields=followers_count&access_token={ACCESS_TOKEN}
But the response returns an error:
(#100) Tried accessing nonexisting field (followers_count)
I also checked /me/accounts and can confirm the Page is linked to the correct Instagram Business account.
What I want:
To correctly retrieve the Instagram account’s followers count.
Specific questions:
- Which API endpoint should I use to request Instagram insights?
- Do I need additional permissions (like
instagram_basicorpages_show_list)? - Do I have to first retrieve the
instagram_business_accountID from the Page before querying metrics?
To fetch Instagram Business account followers count using the Meta Graph API, you need to use the Business Discovery endpoint rather than trying to access followers_count directly on the Facebook Page. The error you’re encountering occurs because the Facebook Page object doesn’t have a followers_count field - Instagram metrics require a different approach.
Contents
- Business Discovery API Endpoint
- Required Permissions and Setup
- Step-by-Step Implementation
- Field Changes and Considerations
- Error Troubleshooting
- Complete Example
Business Discovery API Endpoint
The correct endpoint for fetching Instagram Business account followers count uses the Business Discovery API. According to the official Meta documentation, you need to structure your request as follows:
https://graph.facebook.com/v17.0/{instagram_business_account_id}?fields=business_discovery.username({instagram_username}){followers_count,media_count}
Key points:
- Replace
{instagram_business_account_id}with your Instagram Business Account ID - Replace
{instagram_username}with the target Instagram username - The
business_discoveryfield allows you to query external Instagram Business accounts - You can specify multiple fields like
followers_count,media_count, etc.
Required Permissions and Setup
Yes, you need specific permissions and setup:
-
Access Token Requirements:
- Your access token must have the
pages_show_listpermission - You need
instagram_basicpermission for Instagram-specific access - The token should be generated by a user with Business Manager access
- Your access token must have the
-
Account Linking:
- Your Facebook Page must be linked to the Instagram Business account
- You need to be a business admin of the associated Facebook Page
-
Token Validation:
- Access tokens expire (typically 60 days)
- You need to validate the token has the required scopes
Step-by-Step Implementation
Step 1: Get Instagram Business Account ID from Facebook Page
First, retrieve the Instagram Business Account ID from your linked Facebook Page:
https://graph.facebook.com/v17.0/{page_id}?fields=instagram_business_account&access_token={ACCESS_TOKEN}
Step 2: Use Business Discovery API
Once you have the Instagram Business Account ID, use it to query the target Instagram account:
https://graph.facebook.com/v17.0/{instagram_business_account_id}?fields=business_discovery.username({target_username}){followers_count,media_count}&access_token={ACCESS_TOKEN}
Step 3: Parse the Response
The successful response will include:
{
"business_discovery": {
"followers_count": 267793,
"media_count": 1205,
"id": "17841401441775531"
},
"id": "17841405309211844"
}
Field Changes and Considerations
Important Field Name Changes:
- As Meta has updated their API, field names have been standardized:
follow_count→follows_countfollowed_by_count→followers_countprofile_pic→profile_picture_url
Account Type Limitations:
- The Instagram Graph API only works with Business and Creator accounts
- Consumer (personal) Instagram accounts cannot be accessed via this API
- You must have the target account’s username to use Business Discovery
Error Troubleshooting
Common Errors and Solutions:
-
(#100) Tried accessing nonexisting field (followers_count)- Cause: Trying to access followers_count directly on Facebook Page object
- Solution: Use Business Discovery API instead
-
(#200) The user hasn't authorized the application to perform this action- Cause: Missing required permissions
- Solution: Ensure your access token has
pages_show_listandinstagram_basicpermissions
-
(#100) Invalid Instagram Business Account ID- Cause: Incorrect Instagram Business Account ID
- Solution: Verify the ID by querying your Facebook Page first
-
(#100) Invalid parameter- Cause: Malformed username in business_discovery field
- Solution: Ensure username doesn’t include @ symbol and is case-insensitive
Complete Example
Here’s a complete working example:
Step 1: Get Instagram Business Account ID
GET https://graph.facebook.com/v17.0/YOUR_PAGE_ID?fields=instagram_business_account&access_token=YOUR_ACCESS_TOKEN
Step 2: Fetch Instagram Followers Count
GET https://graph.facebook.com/v17.0/YOUR_INSTAGRAM_BUSINESS_ACCOUNT_ID?fields=business_discovery.username(target_instagram_username){followers_count,media_count}&access_token=YOUR_ACCESS_TOKEN
Response:
{
"business_discovery": {
"followers_count": 123456,
"media_count": 789,
"id": "INSTAGRAM_ACCOUNT_ID"
},
"id": "YOUR_INSTAGRAM_BUSINESS_ACCOUNT_ID"
}
Alternative Approach - Using Page ID Directly:
You can also combine these steps into a single request by using your Page ID directly:
GET https://graph.facebook.com/v17.0/YOUR_PAGE_ID?fields=instagram_business_account{business_discovery.username(target_username){followers_count,media_count}}&access_token=YOUR_ACCESS_TOKEN
This approach eliminates the need for a separate API call to get the Instagram Business Account ID first.
Remember to replace all placeholders with your actual values and ensure your access token has the required permissions before making the API calls.
Sources
- Official Facebook Developer Documentation - Business Discovery API
- Ficode - Using Instagram Graph API to access business account followers
- Meta simplifies Instagram and marketing API integrations
- Stack Overflow - Instagram Graph API get followers
- Jamie Maguire - Instagram Graph API Insights
- GitHub - Meta API Get Instagram Data
Conclusion
To successfully retrieve Instagram Business account followers count using the Meta Graph API:
- Use the Business Discovery API endpoint with the correct structure:
business_discovery.username({username}){followers_count} - Ensure you have proper permissions including
pages_show_listandinstagram_basicfor your access token - First retrieve the Instagram Business Account ID from your linked Facebook Page, then use it in the Business Discovery API call
The key is understanding that Instagram metrics are accessed through the Business Discovery endpoint rather than directly through the Facebook Page object. This approach allows you to fetch follower counts, media counts, and other Instagram-specific metrics for Business and Creator accounts.
For ongoing monitoring, consider implementing token refresh logic since access tokens typically expire every 60 days, and build proper error handling for API rate limits and permission issues.