Skip to main content

Social::Instagram::Profile - Instagram parser. Collecting data from Instagram profiles

Social::Instagram::Profile

Social::Instagram::Profile parser overview

Social::Instagram::ProfileSocial::Instagram::Profile – parses profile data from Instagram. The Instagram parser allows you to organize mass data scraping from user profiles. Collected data 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 parsing settings for the Social::Instagram::Profile parser for future use (presets), set a parsing schedule, and much more.

Saving results is possible in the form and structure you need, thanks to the built-in powerful 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 parser uses data from an authorized account. To operate the parser, you must specify a value for the cookie option.

Parser use cases

Collecting links to posts
  1. Override the Result format option, specifying $posts.format('$link\n') as the value.
  2. Override the Posts pages count option, selecting All from the list.
  3. Specify links to profiles 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 following
  • Link to author's profile
  • Channel
  • Whether the profile is a business profile
  • Whether the profile is private
  • Whether the profile is verified
  • Link to avatar
  • Link to facebook page
  • Information about posts
  • 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
    • Link to media
    • Publication height
    • Publication width
    • Link to publication author
    • Location
    • Number of views (video)
  • Following and followers
    • Identifier
    • Link to profile
    • Nickname
    • Full name
    • Whether the profile is private
    • Whether the profile is verified
    • Link to avatar
    • Whether the user is a potential scammer
  • Attached links
    • Title
    • Link
    • Type

Use cases

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

Configuration

Obtaining the mandatory option for authorization

Spoiler: how to find the cookie?

Go to any profile after opening debug mode by pressing F12. Debug Using the string graphql/query (json type), search for the required request where the values for the parser are stored. Search Go to the request and copy the value from the cookie parameter. Values

Queries

You must specify the profile nickname as queries, for example:

cristiano 
kyliejenner

Output results examples

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

Default output

Result format:

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

Result example:

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 following and followers profiles

Result format:

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

Result example:

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
cookieCookie must be specified beforehand
x-csrftokenAbility to specify x-csrftoken (if necessary)
x-ig-app-id936619743392459Ability to specify x-ig-app-id (if necessary)
Posts pages count1Number of pages with posts
Followers pages count1Number of pages with followers
Followings pages count1Number of pages with following