Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.41 KB

setup.md

File metadata and controls

38 lines (28 loc) · 1.41 KB

Setup

Installation

composer require mineur/instagram-parser:dev-master

How to get your query hash (old: query id)

Instagram uses GraphQL for its API, and needs a mandatory parameter named query_hash to make the internal requests.

Instagram also supports a parameter named query_id but since there is no easy way to get one, we'll keep the query_hash parameter instead.

This is an easy method to get your query hash. Once you get one, you don't need to worry about this anymore.

  1. Run your browser and type http://www.instagram.com/github/.

Instagram Github page

  1. Then, go to Web Inspector > Network > xhr.

Chrome web inspector

  1. Scroll down the page and click on Load more blue button.

Instagram load more

  1. Take a look at the following xhr query:

Instagram xhr queries

  1. Copy the param query_hash like so, and keep it to build the parser.

Instagram xhr queries

You're done!

Now you can go back with your query hash: home readme

Attention! Query hashes may change depending on the endpoint your are fetching. For example, userMediaParser endpoint may need a different hash than locationParser endpoint.