Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
javascript scraping with Cross-Origin Request Blocked problem

I'm trying to scrape data from a website by sending xhr(XMLHttpRequest) from browser itself from Firefox Devtools but i always get the following error of course i don't have access to the server I'm trying to get the response of my requests and the code is a get code that site triggers by a button here is the code i use in console:

var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://i.instagram.com/api/v1/media/2624924054824738183/comments/?can_support_threading=true&min_id={"server_cursor": "QVFBZTYyanpWOFJ1ZU9KeUtSeWVVNnhtZXV0ajI3bFZKRnI2aDNMNHo1OUxKcExEdVkyeDRSU2lYYXM4MUVCbUVyMDROcTEtbE9KUEJNS3I4bWZ1dVVBdWRfZzYwS1dLUWc4OXNPOWlMMExhQXc=", "is_server_cursor_inverse": true}');

xhr.setRequestHeader('User-Agent', 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0');
xhr.setRequestHeader('Accept', '*/*');
xhr.setRequestHeader('Accept-Language', 'en-US,en;q=0.5');
xhr.setRequestHeader('X-IG-App-ID', '936619743392459');
xhr.setRequestHeader('X-ASBD-ID', '198387');
xhr.setRequestHeader('X-IG-WWW-Claim', 'hmac.AR28NCc9EqpWszE6HH3u0kqIsH_2lC5Ph4NKgFGrbxFwviKw');

xhr.send();

and the error i get is :

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!