Scrapling icon indicating copy to clipboard operation
Scrapling copied to clipboard

[Bug]: Reddit .json API endpoints return 403 Forbidden — all fetchers, all versions

Open downwind7clawd-ctrl opened this issue 3 months ago • 1 comments

Description

Reddit's .json API endpoints (e.g., https://www.reddit.com/r/worldnews/hot.json) return 403 Forbidden regardless of fetcher type, User-Agent, or Scrapling version.

Environment

  • Scrapling: 0.4.10 AND 0.4.12 (both tested)
  • Fetchers tested: get, fetch (DynamicFetcher), stealthy-fetch
  • OS: Ubuntu 24.04, Python 3.12

Reproduction

# All three return 403:
scrapling extract get "https://www.reddit.com/r/worldnews/hot.json" /tmp/out.txt
scrapling extract fetch "https://www.reddit.com/r/worldnews/hot.json" /tmp/out.txt --headless

# Even with raw curl + browser UA:
curl -s -o /dev/null -w "%{http_code}" \
  "https://www.reddit.com/r/worldnews/hot.json" \
  -H "User-Agent: Mozilla/5.0 ..."
# → 403

Workaround

HTML pages (/r/subreddit/hot/) work fine with DynamicFetcher + --wait-selector "shreddit-post". Only .json endpoints are blocked.

Question

Is this a known limitation? Has Reddit fully deprecated unauthenticated .json access, or is this a Scrapling-specific issue with JSON content-type handling?

downwind7clawd-ctrl avatar Aug 07 '26 04:08 downwind7clawd-ctrl

Hi, it's not a bug from Scrapling. Reddit is blocking any unauthenticated requests to the json URL. Try opening it in an incognito window in your browser, and you will get blocked.

D4Vinci avatar Aug 09 '26 16:08 D4Vinci