Claude Code Curl Alternative: When Websites Block Your Requests

Published: (March 11, 2026 at 01:36 PM EDT)
6 min read
Source: Dev.to

Source: Dev.to

Source: Dev.to

Claude Code Curl Alternative: When Websites Block Your Requests

You’ve got Claude Code doing research or pulling data—and it leans on curl to fetch pages. It works like a charm at first, then you hit a site that slams the door: 403 Forbidden, access denied, or just a blank screen.

“Fine, I’ll spin up Playwright locally.”
Real browser, real JavaScript—what could go wrong?

Turns out: plenty. Local Playwright adds serious overhead and often runs into the same anti‑bot walls. There’s a smoother path.


Why curl Fails

ProblemWhat Happens
Missing or suspicious headerscurl sends minimal headers. Sites expect User‑Agent, Accept‑Language, Accept‑Encoding, etc. Without them you look like a bot.
No JavaScript executionMany sites deliver a skeleton HTML and load the real content via JS. curl only grabs the shell → empty pages.
IP‑based rate limitingOne IP, lots of requests. Whether it’s your machine or Claude’s backend, you burn through limits fast.
Bot detectionTLS fingerprints, header order, timing, behavior. curl’s signature is easy to read.
Result403 Forbidden, 429 Too Many Requests, 503 Service Unavailable, or blank pages → Claude Code has nothing to work with.

Why Local Playwright Isn’t a Silver Bullet

DrawbackImpact
Heavy dependenciesChromium/Firefox/WebKit → hundreds of MB to install & keep updated.
Memory & CPUEach headless instance chews RAM & CPU. Parallel crawls become expensive fast.
Environment headachesDifferent OSes, Node versions, Playwright versions → “Works on my machine” becomes a new catch‑phrase.
Still blocked by advanced bot detection• Cloudflare challenges (Turnstile, JS challenges, “Checking your browser” screens)
• Headless detection (navigator.webdriver, missing plugins, odd resolutions)
• Behavioral analysis (no mouse moves, unnatural scroll speed)
• Proxy/VPN detection (datacenter IPs flagged)
ResultSame 403s, Cloudflare blocks, captchas – but now you’re lugging a heavier stack.

AnyCrawl – Crawl for AI

AnyCrawl is a cloud‑scraping API built for AI agents and LLMs. It bypasses typical limits (including Cloudflare challenges) without requiring a local browser. The service returns LLM‑optimized Markdown, ready for Claude, ChatGPT, and other models. When curl or a local Playwright instance hits a wall, AnyCrawl is the drop‑in replacement.

FeatureCurlAnyCrawl
HeadersMinimal → easy to fingerprintFull browser‑like headers & request patterns
JavaScriptNoneCheerio, Playwright, and Puppeteer engines in cloud
IP handlingSingle IP → easily rate‑limitedRotating proxy support to distribute traffic
Anti‑botBlocked by Cloudflare, 403, etc.Bypasses Cloudflare and manages anti‑detection

How AnyCrawl Works

  1. Send a URL – AnyCrawl fetches it (optionally executing JavaScript).
  2. Receive clean Markdown (or raw HTML) optimized for AI consumption.
  • No local browser required.
  • No proxy configuration needed.
  • No ongoing maintenance.

Using AnyCrawl with Claude Code

1. Install the AnyCrawl CLI

# Global install
npm install -g anycrawl-cli

# Or one‑off use
npx -y anycrawl-cli init

2. Authenticate

# Get your API key at https://anycrawl.dev/dashboard
anycrawl login --api-key <YOUR_API_KEY>

3. Install the Claude Code skill

anycrawl setup skills

The skill teaches Claude Code when and how to use AnyCrawl for scraping, search, mapping, and crawling—automatically swapping in AnyCrawl whenever curl gets blocked.

4. (Optional) MCP Integration

claude mcp add --transport stdio anycrawl \
  -e ANYCRAWL_API_KEY=YOUR_API_KEY \
  -- npx -y anycrawl-mcp@latest
  • Replace YOUR_API_KEY with the key from your dashboard.
  • You can also run anycrawl setup mcp after installing the CLI.

5. Call the API Directly (scripts or other AIs)

curl -X POST "https://api.anycrawl.dev/v1/scrape" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "url": "https://example.com/page-that-blocks-curl",
        "engine": "playwright"
      }'

The response includes markdown (or html) optimized for AI—ready for Claude or any LLM.

Pricing & Credits

PlanFree creditsPaid startWhat credits cover
Free1,500 credits / month (no card required)- Cheerio (static HTML) – lowest cost
- Playwright (JS‑heavy) – moderate cost
- Puppeteer – similar to Playwright for Chrome‑specific needs
Hobby2,500 credits / monthHigher volume, priority support
EnterpriseCustomUnlimited scaling, dedicated proxies, SLA

Typical research, docs lookup, and small‑scale extraction (dozens to a few hundred pages/month) fit comfortably within the free tier.

Choosing the Right Tool

ScenarioBest Tool
Simple public pages, no anti‑botClaude Code curl
JavaScript‑heavy but not protectedLocal Playwright (if you’re fine with the setup)
Protected sites (Cloudflare, 403/429, captchas)AnyCrawl
High volume, many domainsAnyCrawl (cloud, proxies, concurrency)
Claude Code integrationAnyCrawl CLI + skill (anycrawl setup skills)

Get Started

  1. Sign up at your preferred platform.

  2. Promo code: STARTUPY

  3. Grab your API key from the dashboard.

  4. Install the CLI & skill:

    anycrawl setup skills   # see the CLI docs for details
  5. Or call the Scrape API directly from your own scripts.

No credit card needed for the free tier. Try scraping a URL that blocks curl—the difference shows up right away.


TL;DR

  • curl – perfect for open, static pages.
  • Local Playwright – adds complexity and often still fails on protected sites.
  • AnyCrawl – cloud‑based, bypasses Cloudflare & anti‑bot measures, uses rotating proxies, handles concurrency, and returns AI‑ready Markdown.

Use AnyCrawl as a drop‑in replacement when curl gets blocked, and let Claude Code focus on what it does best: reasoning over clean, structured data.

AnyCrawl runs headless browsers in the cloud, bypasses anti‑bot protections, and returns LLM‑ready Markdown. For daily use, 1,500 free credits cover most research and extraction—without running browsers locally or wrestling anti‑bot systems yourself.
0 views
Back to Blog

Related posts

Read more »

Papio Framework Generator

Stop Writing Test Framework Manually — I Built a Chrome Extension That Does It For You Playwright, Cypress, WebdriverIO, Selenium If you've spent time in test a...