# Bypass Captcha

You can enable **Stealth Mode** to bypass Cloudflare or other bot protection systems. Simply set **`stealth_mode=true`** in your request parameters to activate it. Each request in Stealth Mode costs **`10 credits`**.

### API Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl "https://api.scrapingdog.com/scrape?api_key=5e3a0e5a97e5b1ca5b194f42da86&url=http://httpbin.org/ip&stealth_mode=true"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.scrapingdog.com/scrape"

params = {
    "api_key": "5e3a0e5a97e5b1ca5b194f42da86",
    "url": "http://httpbin.org/ip",
    "stealth_mode": "true"
}

response = requests.get(url, params=params)

print(response.text)

```

{% endtab %}

{% tab title="Nodejs" %}

```javascript
import axios from "axios";

const url = "https://api.scrapingdog.com/scrape";

const params = {
  api_key: "5e3a0e5a97e5b1ca5b194f42da86",
  url: "http://httpbin.org/ip",
  stealth_mode: "true",
};

axios
  .get(url, { params })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error("Error:", error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$url = "https://api.scrapingdog.com/scrape?api_key=5e3a0e5a97e5b1ca5b194f42da86&url=http://httpbin.org/ip&stealth_mode=true";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo $response;
}

curl_close($ch);
?>

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'uri'

uri = URI("https://api.scrapingdog.com/scrape")
params = {
  api_key: "5e3a0e5a97e5b1ca5b194f42da86",
  url: "http://httpbin.org/ip",
  stealth_mode: "true"
}
uri.query = URI.encode_www_form(params)

response = Net::HTTP.get_response(uri)

if response.is_a?(Net::HTTPSuccess)
  puts response.body
else
  puts "Error: #{response.code} - #{response.message}"
end

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class ScrapingdogExample {
    public static void main(String[] args) {
        try {
            String urlString = "https://api.scrapingdog.com/scrape"
                    + "?api_key=5e3a0e5a97e5b1ca5b194f42da86"
                    + "&url=http://httpbin.org/ip"
                    + "&stealth_mode=true";

            URL url = new URL(urlString);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();

            conn.setRequestMethod("GET");
            conn.setConnectTimeout(10000); // 10 seconds
            conn.setReadTimeout(10000);

            int responseCode = conn.getResponseCode();
            System.out.println("Response Code: " + responseCode);

            BufferedReader in = new BufferedReader(
                    new InputStreamReader(conn.getInputStream()));
            String inputLine;
            StringBuilder response = new StringBuilder();

            while ((inputLine = in.readLine()) != null) {
                response.append(inputLine);
            }

            in.close();
            conn.disconnect();

            System.out.println("Response: " + response.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scrapingdog.com/web-scraping-api/request-customization/bypass-captcha.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
