G
G
Gabe_B2021-05-02 14:48:11
PHP
Gabe_B, 2021-05-02 14:48:11

How to get json from Instagram in PHP?

There is a page - https://www.instagram.com/[username]/?__a=1
JSON opens in the browser, but how to get it via curl?
All tried options produce a blank page or Not Found.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Babichev, 2021-05-02
@REZ1DENT3

Accept, Host, User-Agent, Accept-Language and non-blocked IP.

curl -X GET \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Host: www.instagram.com' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15' \
-H 'Accept-Language: ru' \
'https://www.instagram.com/durov/?__a=1'

608eb83fe6642814652204.png

P
Puma Thailand, 2021-05-02
@opium

Good proxies, authorization, correct headeners and user agent

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question