Tutorials

Using Fiddler to Inspect CaptchaAI API Traffic

When CAPTCHA solves fail and your logs don't show enough detail, intercepting the actual HTTP traffic reveals what's happening. Fiddler captures every request and response between your code and the CaptchaAI API, letting you see exact payloads, headers, and timing.

When to Use Fiddler for Debugging

Scenario What Fiddler Reveals
API returns errors but your code logs are sparse Full request body, headers, and response
Solve requests seem to hang Whether requests are reaching the server or timing out
Token appears invalid when injected Exact token content and any encoding issues
Proxy-related failures Whether requests route through the expected proxy
Rate limit issues Request timing and 429 response patterns

Setting Up Fiddler for HTTPS Traffic

Step 1: Install and Configure HTTPS Decryption

Fiddler acts as a local proxy that intercepts HTTPS traffic. You need to enable HTTPS decryption to see CaptchaAI API payloads:

Fiddler Everywhere:

  1. Open Settings → HTTPS
  2. Enable "Capture HTTPS traffic"
  3. Install the Fiddler root certificate when prompted
  4. Trust the certificate in your OS certificate store

Fiddler Classic (Windows):

  1. Tools → Options → HTTPS
  2. Check "Decrypt HTTPS traffic"
  3. Click "Actions" → "Trust Root Certificate"

Step 2: Configure Your Code to Use Fiddler's Proxy

Fiddler listens on 127.0.0.1:8866 (Fiddler Everywhere) or 127.0.0.1:8888 (Fiddler Classic).

Python (requests):

import requests

proxies = {
    "http": "http://127.0.0.1:8866",
    "https": "http://127.0.0.1:8866",
}

# Submit CAPTCHA task through Fiddler
response = requests.post(
    "https://ocr.captchaai.com/in.php",
    data={
        "key": "YOUR_API_KEY",
        "method": "userrecaptcha",
        "googlekey": "SITE_KEY",
        "pageurl": "https://example.com",
        "json": 1,
    },
    proxies=proxies,
    verify=False,  # Required for Fiddler's self-signed cert
)
print(response.json())

JavaScript (Node.js with axios):

const axios = require("axios");
const HttpsProxyAgent = require("https-proxy-agent");

const agent = new HttpsProxyAgent("http://127.0.0.1:8866");

async function submitTask() {
  const response = await axios.post(
    "https://ocr.captchaai.com/in.php",
    new URLSearchParams({
      key: "YOUR_API_KEY",
      method: "userrecaptcha",
      googlekey: "SITE_KEY",
      pageurl: "https://example.com",
      json: 1,
    }),
    {
      httpsAgent: agent,
      proxy: false, // Disable axios default proxy handling
    }
  );
  console.log(response.data);
}

submitTask();

Note: verify=False (Python) disables SSL verification for Fiddler's intercepting certificate. Only use this during debugging — remove it in production.

Filtering CaptchaAI Traffic

Add filters to see only CaptchaAI requests in a busy session.

Fiddler Everywhere Filters

  1. Click the Filters tab
  2. Add a rule: Hostcontainsocr.captchaai.com
  3. Apply the filter

Fiddler Classic Filters

  1. Click the Filters tab
  2. Check "Use Filters"
  3. Under "Hosts," select "Show only the following Hosts"
  4. Enter: ocr.captchaai.com

Now only CaptchaAI API requests appear in the session list.

Inspecting Request and Response

Submit Request (in.php)

When you capture a task submission, inspect these fields in Fiddler:

Panel What to Check
Headers Content-Type should be application/x-www-form-urlencoded
Request Body Verify key, method, googlekey/sitekey, pageurl are correct
Response Body Should return {"status":1,"request":"TASK_ID"} on success
Response Code 200 = OK, 403 = key issue, 429 = rate limited

Poll Request (res.php)

When polling for results:

Panel What to Check
Request Body key, action=get, id=TASK_ID, json=1
Response Body CAPCHA_NOT_READY while processing, {"status":1,"request":"TOKEN"} on success
Timing Check intervals between polls — should be 5+ seconds

Common Issues Visible in Fiddler

What You See Meaning
Request body has empty googlekey Sitekey extraction failed upstream
Response: {"status":0,"request":"ERROR_WRONG_USER_KEY"} API key is invalid
Response: {"status":0,"request":"ERROR_ZERO_BALANCE"} Account has no funds
Response: {"status":0,"request":"ERROR_NO_SLOT_AVAILABLE"} Server busy — retry
No response (timeout) Network/proxy blocking the connection
429 status code Too many requests — slow down polling

Using Breakpoints

Breakpoints pause requests before they're sent, letting you modify them:

Setting a Breakpoint

Fiddler Everywhere:

  1. Rules → Add Rule
  2. Match: URL contains ocr.captchaai.com/in.php
  3. Action: "Pause before sending"

Fiddler Classic:

  1. Rules → Automatic Breakpoints → Before Requests
  2. Or type bpu ocr.captchaai.com in the QuickExec bar

What to Do at a Breakpoint

When a request is paused:

  1. Inspect the request body — verify all parameters are correct
  2. Edit parameters — change method, googlekey, or pageurl to test different values
  3. Resume — click "Run to Completion" to send the modified request
  4. Check the response — see if your change fixed the issue

This is useful for testing whether a parameter value is causing failures without changing code.

Replaying Failed Requests

When a request fails, you can replay it from Fiddler:

  1. Right-click the failed session
  2. Select ReplayReissue Requests
  3. The same request is sent again with identical headers and body

To replay with modifications:

  1. Right-click → Edit in Composer
  2. Modify the parameters
  3. Click Execute

This lets you test fixes without restarting your application.

Composing Test Requests

Use Fiddler's Composer to build CaptchaAI requests from scratch:

Task submission:

POST https://ocr.captchaai.com/in.php
Content-Type: application/x-www-form-urlencoded

key=YOUR_API_KEY&method=userrecaptcha&googlekey=SITE_KEY&pageurl=https://example.com&json=1

Result polling:

GET https://ocr.captchaai.com/res.php?key=YOUR_API_KEY&action=get&id=TASK_ID&json=1

This is faster than writing code when you just want to verify the API is working.

Analyzing Timing

Fiddler's Timeline view shows request duration:

Metric Healthy Value Problem Indicator
DNS lookup < 50ms > 500ms = DNS issue
TCP connect < 100ms > 1000ms = network issue
TLS handshake < 200ms > 1000ms = certificate issue
Server response (in.php) < 500ms > 2000ms = server congestion
Server response (res.php) < 200ms > 1000ms = unusual — check status

Exporting Sessions for Support

If you need to share debug data with CaptchaAI support:

  1. Select the relevant sessions in Fiddler
  2. File → Export Sessions → Selected Sessions
  3. Choose HTTPArchive (.har) format
  4. Remove your API key from the exported file before sharing
Find and replace your actual API key with "REDACTED" in the .har file

Troubleshooting

Issue Cause Fix
Fiddler shows no traffic Code not routing through Fiddler's proxy Set proxy to 127.0.0.1:8866 (Everywhere) or 8888 (Classic)
SSL certificate errors Fiddler's root cert not trusted Reinstall Fiddler certificate; add to trusted roots
Fiddler shows garbled response body Response is compressed Enable "Decode" button in toolbar (or Rules → Remove All Encodings)
Breakpoints don't trigger Filter or rule mismatch Verify URL pattern matches ocr.captchaai.com exactly
Traffic appears but body is empty Content-Length mismatch or streaming response Click session and wait for full response to load

FAQ

Does using Fiddler affect CAPTCHA solve timing?

Minimally. Fiddler adds ~1-5ms of latency per request due to the proxy hop. This is negligible compared to CAPTCHA solve times (10–60 seconds). For timing-critical debugging, note that Fiddler's timestamps reflect when Fiddler received the data, not when your code sent it.

Can I use Fiddler with browser-based CAPTCHA solving?

Yes. Configure your browser to use Fiddler as its proxy, and you'll see all CAPTCHA-related requests — including widget loading, challenge retrieval, and token submission. This is useful for understanding the full CAPTCHA lifecycle.

Should I use Fiddler Classic or Fiddler Everywhere?

Fiddler Everywhere is cross-platform (Windows, macOS, Linux) with a modern UI. Fiddler Classic is Windows-only but has more advanced scripting capabilities (FiddlerScript). For basic CaptchaAI debugging, either works.

Next Steps

Clear API error messages make debugging faster — start with CaptchaAI and use Fiddler when you need deeper request-level inspection.

Related guides:

Full Working Code

Complete runnable examples for this article in Python, Node.js, PHP, Go, Java, C#, Ruby, Rust, Kotlin & Bash.

View on GitHub →

Discussions (0)

No comments yet.