How to Prevent Blocks in Sherlock with Bright Data Web Unlocker API

Connect Sherlock to Bright Data’s Web Unlocker API in proxy mode to avoid bot detection blocks and find more profiles in OSINT lookups.
8 min read
Sherlock with Bright Data

In this blog post, you will learn:

  • What Sherlock is and why it has gained so much traction in the OSINT community.
  • How Sherlock works, why its requests can get blocked, and how Bright Data’s Web Unlocker API can help overcome these limitations.
  • How to integrate Web Unlocker in proxy mode with Sherlock to improve lookup success rates for free.

Let’s dive in!

What Is Sherlock?

Sherlock

Sherlock is an open-source Python tool that searches for social media and online accounts associated with a given username across 400+ platforms.

Sherlock’s GitHub growth history

The project has gained 120k+ GitHub stars, with 13,700+ forks and 280+ contributors. This has made it one of the most widely recognized open-source OSINT tools.

Sherlock automates username discovery by checking whether a particular username exists on supported websites. It relies on a structured database (data.json) containing each platform’s profile URL patterns and detection rules.

For every target website, Sherlock constructs the corresponding profile URL and sends an HTTP request to determine whether the account exists.

The Biggest Limitation of Sherlock and How to Address It

Behind the scenes, Sherlock uses Python’s Requests library, together with requests-futures, to send HTTP requests concurrently to hundreds of websites. It then analyzes HTTP status codes, response URLs, and page content to determine whether a username exists.

This approach makes Sherlock fast and efficient, but it also creates a major limitation. Although the tool sends requests with a legitimate-looking User-Agent header, that alone is not enough to avoid bot detection.

Websites can identify automated traffic through TLS fingerprinting and block the requests. Sherlock also cannot execute JavaScript to access content that requires browser-side rendering.

To mitigate these restrictions, the solution includes built-in Tor integration for IP rotation. However, using Tor for web scraping is rarely effective. Tor exit-node IP addresses are publicly known and widely blocked by anti-bot providers, making them easy to identify and restrict.

This issue is also reflected in Sherlock’s GitHub issue tracker. Of the 125 open issues currently reported in the repository, more than 30 concern false positives, false negatives, and HTTP 403 errors caused by access restrictions, or error pages returned instead of the expected results.

The Solution: Bright Data’s Web Unlocker API

Bright Data’s Web Unlocker API is a web scraping API that handles anti-bot challenges and returns the requested page’s HTML. This is how it works:

  1. You submit a target URL to the Web Unlocker API.
  2. Web Unlocker manages the complex parts of accessing the page, including IP rotation across Bright Data’s 400M+ IP proxy network, browser fingerprinting, retries, CAPTCHA solving, TLS fingerprinting, and JavaScript rendering.
  3. It returns the requested page’s content.

Sherlock does not natively support web scraping APIs, but it does support proxies. Now, the Web Unlocker API offers a proxy-based access mode that lets you use the API as an HTTP proxy. Thanks to that option, you can configure Sherlock to route its requests through the Bright Data Web Unlocker API.

This integration helps reduce blocks and improve the number of successful profile checks. Also, Web Unlocker API usage is included in Bright Data’s free plan, which gives you 5,000 successful requests per month. Thus, you can enhance your Sherlock searches at no cost.

How to Integrate Sherlock with Bright Data Web Unlocker API Proxies to Avoid Blocks

In this tutorial section, you will see how to configure Sherlock to use Bright Data’s Web Unlocker API in proxy mode.

The setup routes all Sherlock requests to target websites through Bright Data’s unlocking infrastructure. This helps retrieve more data, reducing blocks by improving request success rates up to 99.95%.

Prerequisites

Before getting started, make sure you have:

Step #1: Install Sherlock

To install Sherlock globally using the sherlock-project PyPI package, run:

  pipx install sherlock-project

Alternatively, you can follow the official guide for other installation methods, including Docker, Homebrew, and Linux packages.

Once the installation is complete, verify that the Sherlock CLI is available globally with:

  sherlock --version

You should see output similar to:

  Sherlock v0.16.2

This is it! Sherlock is now installed and ready to use on your machine.

Step #2: Test Sherlock

Before integrating Bright Data, verify that Sherlock works as expected by running it against a sample username, such as antozanini:

  sherlock 'antozanini' --csv --print-all

Both flags are optional:

  • --csv: Exports the results to a <username>.csv file.
  • --print-all: Displays the results for all checked websites, including unsuccessful lookups.

Here is what the output should look like:

A partial view of the output produced by Sherlock

As you can see from the command output, several websites return bot detection pages instead of the expected results. That prevents the tool from doing its job. Also, notice how Sherlock itself recommends setting up a proxy to avoid the errors.

More specifically, out of the 400+ websites checked, 36 returned a “Blocked by bot detection” error. However, the actual number of blocked requests is higher, as some websites disguise bot detection pages behind HTTP 404 responses.

As a result, Sherlock discovers only 14 profiles in this run:

Note the 14 detected matches

The produced CSV file provides an even clearer picture of the problem, revealing additional requests that returned HTTP 403 Forbidden responses:

Note the many 403 responses

Clearly, these blocks limit Sherlock’s ability to discover profiles across the listed platforms.

It is time to add Bright Data’s Web Unlocker API proxies to overcome these restrictions and improve the overall success rate!

Step #3: Retrieve Your Web Unlocker API Proxy Access URL

First, log in to your Bright Data account. From the control panel, navigate to “Web Access > My APIs” page using the left-hand menu:

Access the “Web Access > My APIs”  menu entry in Bright Data's control panel

In the “My APIs” table, check whether a Web Unlocker API entry is already available:

Note the Web Unlocker API entry

If a Web Unlocker API is already configured, you are good to go. Otherwise, click “Create API > Unlocker API” and follow the setup wizard to create one:

Clicking the “Create API > Unlocker API” option

For this tutorial, we will assume your Web Unlocker API is named web_unlocker.

Next, open your Web Unlocker API settings and navigate to the “Native proxy-based access” section:

Accessing the “Native proxy-based access” tab

On the left-hand panel, locate the proxy connection details:

  • Host
  • Username
  • Password
  • Port

You will need these fields to construct your proxy access URL using the following format:

  http://<username>:<password>@<host>:<port>

Note: To reveal your proxy password, click “Show” and enter the verification code sent to your email address.

In this case, the Web Unlocker API proxy URL looks like this:

  http://brd-customer-hl_4bcb8ada-zone-web_unlocker:<PASSWORD>@brd.superproxy.io:44445

Adapt it to your username and password. The host and port should remain the same.

Important: To avoid SSL certificate verification issues when accessing HTTPS websites through the proxy, you must set up Bright Data’s SSL certificate on your machine. Follow the official Bright Data documentation for instructions on downloading and installing it.

Fantastic! You now have the proxy URL needed to let Sherlock access target websites while avoiding blocks.

Step #4: Install pip-system-certs

By default, pip uses the truststore library to access trusted CA certificates. This means Python applications installed through pip (or pipx, in this case) may not automatically recognize the Bright Data SSL certificate you previously installed in your operating system’s certificate store.

To check whether this causes an issue, run Sherlock against a username (e.g., antozanini) using your Bright Data Web Unlocker API proxy URL:

  sherlock 'antozanini' --proxy '<YOUR_WEB_UNLOCKER_API_PROXY_URL>' --csv --print-all

If Sherlock encounters SSL certificate verification problems, you will see an “Error Connecting” message on each destination website:

Note the “Error Connecting” errors

To identify the underlying issue, run the command in verbose mode (-v or --verbose). You should see an error message similar to this:

  ERROR: Problem while attempting to access data file URL '<TARGET_SITE>': HTTPSConnectionPool(host='<TARGET_SITE>', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)')))

In other words, Sherlock’s HTTP requests dependency cannot access the Bright Data SSL certificate installed in the operating system’s certificate store, resulting in SSL certificate verification failures.

To fix that, inject pip-system-certs into your Sherlock pipx environment:

  pipx inject sherlock-project pip-system-certs

The pip-system-certs package configures Python to use the system’s trusted CA certificates, allowing applications to recognize certificates installed in the operating system’s certificate store.

Well done! Sherlock is now configured to read the Bright Data CA certificate to avoid SSL verification issues.

Step #5: Run Sherlock with the Bright Data Web Unlocker API Proxy

Now, run Sherlock against one or more target usernames, routing all requests through your Bright Data Web Unlocker API proxy:

  sherlock 'antozanini' --proxy '<YOUR_WEB_UNLOCKER_API_PROXY_URL>' --csv --print-all

Replace antozanini with your target username or list of usernames.

This is what the output should look like:

No target website is failing with "Blocked by bot detection" errors

Notice how Sherlock confirms that it is using the specified proxy through the “Using the proxy” log message. More importantly, none of the checked websites now report “Blocked by bot detection” errors.

This time, Sherlock discovers 45 matching profiles:

Note the 45 results

That is 31 more matches than in our previous run without the proxy configuration!

This example demonstrates how Bright Data’s Web Unlocker API proxy can significantly improve Sherlock’s results by helping overcome website restrictions and bot detection. Even better, Bright Data’s free tier provides 5,000 successful Web Unlocker API requests per month, allowing you to take advantage of this integration for free.

Et voilà! You have just given Sherlock superpowers.

Conclusion

In this article, you learned what Sherlock is, how it works under the hood, and why its automated requests can trigger anti-bot protections on target websites.

By integrating the Bright Data Web Unlocker API through its proxy-based access mode, you reduced blocked requests from 36 to zero in our test, achieving an overall 100% success rate.

This setup lets you unlock Sherlock’s full potential at no cost, as Bright Data’s free tier gives you 5,000 Web Unlocker API requests per month.

Create your free Bright Data account and start integrating our web data solutions for free!

No credit card required
Antonello Zanini

Technical Writer

5.5 years experience

Antonello Zanini is a technical writer, editor, and software engineer with 5M+ views. Expert in technical content strategy, web development, and project management.

Expertise
Web Development Web Scraping AI Integration