composer require mineur/instagram-parser:dev-master
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 thequery_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.
- Run your browser and type
http://www.instagram.com/github/
.
- Then, go to
Web Inspector > Network > xhr
.
- Scroll down the page and click on Load more blue button.
- Take a look at the following xhr query:
- Copy the param
query_hash
like so, and keep it to build the parser.
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 thanlocationParser
endpoint.