Instagram ?__a=1 url not working anymore & problems with graphql/query to get data

后端 未结 7 1193
难免孤独
难免孤独 2020-11-30 18:23

Update 19 April

After a few days using cookie ig_pr two days ago is block. Looks like the only way to get the data now is use sessionid w

相关标签:
7条回答
  • 2020-11-30 19:10

    I just came by the same issue.

    Looks like they just changed their private api by removing the max_id. Their website seems to have replaced the old api with the graphql api.

    https://www.instagram.com/graphql/query/?query_hash=472f257a40c653c64c666ce877d59d2b&variables={"id":"111","first":12,"after":"xxx"}

    • id: user ID,
    • first: amount of nodes to get,
    • after: the 'end_cursor' you can get from data['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']

    use either query_hash or query_id

    • query_hash: 472f257a40c653c64c666ce877d59d2b
    • query_id: 17888483320059182

    I have no idea how long that query_id/query_hash will work, it's up to Instagram. They will eventually change it.

    Updated 4/8/2018 - Before FB didn't check any cookies, but looks like they added quick validation. Try adding ig_pr=2 to the request cookie, when sending your API. This quick fix works for me. Who knows when FB will change it again.

    As long as FB doesn't enforce login for these basic APIs, there always will be an easy workaround.

    0 讨论(0)
提交回复
热议问题