Skip to main content

Social::Instagram::Profile - Instagram scraper. Data collection from Instagram profiles

Social::Instagram::Profile

Scraper Overview

Social::Instagram::ProfileSocial::Instagram::Profile – scrapes profile data from Instagram. The Instagram scraper allows for bulk scraping of user profile data. The data collected includes nickname, name, biography, website, number of posts, etc. The full list of collected data can be found in the corresponding section.

A-Parser functionality allows you to save scraper settings of Social::Instagram::Profile for future use (presets), set a scraping schedule, and much more.

Saving results is possible in the form and structure you need, thanks to the built-in powerful templating engine Template Toolkit which allows you to apply additional logic to the results and output data in various formats, including JSON, SQL, and CSV.

note

The scraper uses data from an authorized account. It is mandatory to specify a value for the cookie option for the scraper to work.

Use Cases for the Scraper

Collecting links to posts
  1. Override the Result format option, specify $posts.format('$link\n') as the value.
  2. Override the Posts pages count option, select All from the list.
  3. Specify profile links as queries.
Download example

How to import an example into A-Parser

eJx9U01v2zAM/SuBkMMGBEF72MUYBqTBArTI6qxpT0EOhEVnamRRk+RsneH/Pkpx
7CT78Mn8eI98ItmIAH7vVw49Bi+yTSNs+heZkFhCrYOYCAvOo4vhjVhToUBn2b3x
AXYOqixbOSqVRk7sIY0IbxaZhA7onJIxqCTbBdFeResAuo4JH+fJ40dUjsCMoA7f
yKlfKEdQFFSb8Em0/6az5INfwQ7nMXWgvb3hr91uJ4LVcEd+Qa6CqGpsb6edxD64
hgM+Ewc7GScMW49QxbpjCQFjdFomonfvp+FnZAApVVBkQB8rxEcaqr4Y9T2pNMS5
/OtY6cJRxa6AiSA6307dbcQ42YIp6oT9esSIrATtcSI8t7oAbkReR1RAB4FcbmM/
7G8EmZnWSzygHtIS/12ttOSJzkoG3XfAv6fkf3C0vbzzUjyYH4576FmSdZd/GVCS
lrQ7PYZWlQps++PkMnHDzj2i7d/sMaZV5LAv0zF31XlpLZq4BcPIZnZwXci4GMul
syBTql3ebdYpszbPfBm5mVNlNUZdptaax+LxaViPme/GEI2hwWvwPJW4uKlApP3D
+tiqdYrX70NssOKXPK/aURag9cvT8jwSgT6Qzc1n567GlxZDFE75oCC9d8ELvCNe
LZbXbvub7i+/+d9lZ03L83vlS0ugKDZC2Mev5nk4fHHtb+bPg/A=

Collected Data

  • Nickname
  • Full name
  • Biography
  • Website
  • Number of posts
  • Number of followers
  • Number of followings
  • Author profile link
  • Channel
  • Whether the profile is a business profile
  • Whether the profile is private
  • Whether the profile is verified
  • Avatar link
  • Facebook page link
  • Post information
  • Number of video views
  • Profile email
  • Profile location
  • Phone numbers (from profile bio)
  • Author's publications
    • Type
    • Link
    • Text
    • Time
    • Number of comments
    • Number of likes
    • Media link
    • Publication height
    • Publication width
    • Publication author link
    • Location
    • Number of views (video)
  • Followings and followers
    • Identifier
    • Profile link
    • Nickname
    • Full name
    • Whether the profile is private
    • Whether the profile is verified
    • Avatar link
    • Whether the user is a potential scammer
  • Attached links
    • Title
    • Link
    • Type

Use Cases

  • Collecting profile information
  • Collecting publications
  • Collecting followers
  • Collecting followings
  • Scraping links to posts for use in Social::Instagram::PostSocial::Instagram::Post

Configuration

Obtaining the mandatory option for authorization

Spoiler: how to find a cookie?

Go to any profile after opening the debug mode by pressing F12. Debug Using the line https://www.instagram.com/api/v1/users/web_profile_info/?username=, we look for the necessary request, which stores the values for the scraper. Search Go to the request and copy the value from the cookie parameter. Values

Queries

As queries, you need to specify the profile nickname, for example:

cristiano 
kyliejenner

Output Results Options

A-Parser supports flexible formatting of results thanks to the built-in template engine Template Toolkit, which allows it to output results in any form, as well as in structured formats, such as CSV or JSON

Default Output

Result format:

$query: $full_name, followers: $followers_count, following: $following_count\nPosts:\n$posts.format('$link\n')

Example of result:

cristiano: Cristiano Ronaldo, followers: 579975336, following: 558
Posts:
https://www.instagram.com/p/CrmIE7tNddZ/
https://www.instagram.com/p/Crg1arRNXvX/
https://www.instagram.com/p/CrUE3a6tRs4/
https://www.instagram.com/p/CrK_zvLAofv/
https://www.instagram.com/p/CrGMggNq1Cb/
https://www.instagram.com/p/CrEHoMbK0_C/
https://www.instagram.com/p/Cq8QZGDIix1/
https://www.instagram.com/p/CqxINLiOCPK/
https://www.instagram.com/p/CqoZ8pRo91y/
https://www.instagram.com/p/CqjQjCII98k/
https://www.instagram.com/p/CqeFZMFotaH/
https://www.instagram.com/p/CqcihSbAxaH/

Links to Followers and Followings Profiles

Result format:

Followers:\n$followers.format('$link\n')\nFollowings:\n$followings.format('$link\n')

Example of result:

Followers:
https://www.instagram.com/madhu55745/
https://www.instagram.com/akoy4615/
https://www.instagram.com/kiiitank/
https://www.instagram.com/erzhi19/
https://www.instagram.com/na898poli/
https://www.instagram.com/omronnmaaj/
https://www.instagram.com/abhishak8474/
https://www.instagram.com/karankumarkaran110/
https://www.instagram.com/engin_altannnn/
https://www.instagram.com/biel.full/

Followings:
https://www.instagram.com/rafanery.hrpz/
https://www.instagram.com/hubermanlab/
https://www.instagram.com/insparya_italy/
https://www.instagram.com/gerson_rodrigues_11/
https://www.instagram.com/bernardorsousa/
https://www.instagram.com/eminem/
https://www.instagram.com/spl/
https://www.instagram.com/toto.restaurants/
https://www.instagram.com/thetoolsbook/
https://www.instagram.com/rauwalejandro/
https://www.instagram.com/francisngannou/
https://www.instagram.com/sultan_alghannam/

Possible Settings

ParameterDefault ValueDescription
cookieIt is necessary to specify Cookie in advance
x-csrftokenAbility to specify x-csrftoken (if necessary)
x-ig-app-id936619743392459Ability to specify x-ig-app-id (if necessary)
Posts pages count1Number of post pages
Followers pages count1Number of followers pages
Followings pages count1Number of followings pages