
Instagram Profile Scraper
Pricing
$2.30 / 1,000 results

Instagram Profile Scraper
Scrape all Instagram profile info. Just add one or more Instagram usernames and extract number of followers&follows, URLs, bio, posts, likes, counts, related profiles, captions, highlight reels. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.
4.5 (27)
Pricing
$2.30 / 1,000 results
450
Total users
50.4k
Monthly users
4.5k
Runs succeeded
>99%
Issue response
2.5 days
Last modified
11 hours ago
How to scrape user ID instead of usernames?
Closed
I'm trying to scrape profiles using user ids, without success. It seems the input should be the same, because otherwise the actor complains, but the output is empty.

If the correct profile ID is provided then profile details are scraped as expected: https://console.apify.com/view/runs/Je6ZcXnEM0CI2KY4q (787132 ID is "natgeo" profile)
If an incorrect profile ID is provided, it is saved as follows:
{"url": "https://www.instagram.com/1149037583270282","username": "1149037583270282","error": "not_found","errorDescription": "Post does not exist"}
So you can continue to scrape, actor works as expected. The error message will be changed later, now its not logically correct.
fabshop
Oh, I'm using a wrong ID then. I got it from a webhook call from Instagram:
2025-02-02 10:32:56,103 - instagram_api - INFO - Received webhook: {'object': 'instagram', 'entry': [{'time': 1738503175641, 'id': '17841457912191756', 'messaging': [{'sender': {'id': '1149037583270282'}, 'recipient': {'id': '17841457912191756'}, 'timestamp': 1738503175056, 'message': {'mid': 'aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDU3OTEyMTkxNzU2OjM0MDI4MjM2Njg0MTcxMDMwMTI0NDI1OTc0MTIzOTQ0MTg1NjgwNjozMjA2OTcyMzE0MTYwMDUxOTg4NjU4MjEyMDI5MjgxMDc1MgZDZD', 'text': '6734'}}]}]}
According to the docs at https://developers.facebook.com/docs/messenger-platform/instagram/features/webhook/ the sender id field is:
"sender": { "id": "IGSID" }, // Instagram-scoped ID for the customer who sent the message
I thought that was the profile id, my mistake, thank you.
pd: the IG username can be obtained using the API https://graph.instagram.com/v22.0/{sender.id}