Ready for a free 2 GB trial?

Book a call with one of our Data Nerds to unlock a super-sized free trial.

START TRIAL

How to Add Proxy to Kameleo

Kameleo API integration

Learn how to integrate Massive Proxies with Kameleo Anti-Detect Browser to manage multiple accounts and maintain anonymity while automating web tasks.

What is Kameleo?

Kameleo is an anti-detect browser that helps you bypass anti-bot systems like Cloudflare, DataDome, and PerimeterX. Unlike traditional headless browsers that can be detected through WebDriver automation framework or CDP leaks, Kameleo ensures your automated browsers remain undetectable, appearing as genuine user browsers even when controlled through automation tools like Selenium, Puppeteer, or Playwright.

Key Features

  • Realistic browser fingerprint masking
  • Canvas and WebGL manipulation to avoid detection
  • Unlimited browser profiles
  • Mobile app for mobile profile emulation.
  • Custom secure browsers: Chroma and Junglefox
  • Local API for smooth automation
  • Multi-platform support: Windows and macOS
  • No request rate limit

Step 1: Install Kameleo

  1. Create a Kameleo account at their registration page
  2. Select and purchase a suitable plan
  3. Download the installer from Kameleo's download page
  4. Follow the installation guide

Step 2: Setting Up Massive Proxies

Massive proxies improve Kameleo's functionality by providing 100% ethically sourced residential IPs from diverse global locations. Massive residential proxies offer:

  • 99.84% success rate
  • Response times of <0.8s
  • Coverage across 195+ locations worldwide

Massive Proxy Setup Steps

  1. Visit joinmassive.com and sign up for a plan.
  2. After signing up, go to the Proxy Auth tab in your dashboard to retrieve your proxy credentials (username and password)

For detailed configuration options, refer to the Massive documentation

Step 3: Launch Kameleo.CLI

Windows:

cd C:\Users\<YOUR_USERNAME>\AppData\Local\Programs\Kameleo
Kameleo.CLI.exe email=<YOUR_EMAIL> password=<YOUR_PASSWORD>

macOS:

cd /Applications/Kameleo.app/Contents/Resources/CLI/
./Kameleo.CLI email=<YOUR_EMAIL> password=<YOUR_PASSWORD>

Replace <YOUR_EMAIL> and <YOUR_PASSWORD> with your Kameleo credentials.

The CLI will start a local REST API server at http://localhost:5050 as shown in the image below:

Step 4: Connect to Kameleo via Python

Install the Kameleo client library:

pip install kameleo.local-api-client

Initialize Kameleo Client:

from kameleo.local_api_client import KameleoLocalApiClient
from kameleo.local_api_client.models import CreateProfileRequest, ProxyChoice, Server
import time
import os

kameleo_port = os.getenv('KAMELEO_PORT', '5050')

Step 5: Create a Browser Profile with Massive Proxy

5.1 Find a Base Browser Profile

Kameleo uses base profiles (real browser fingerprints) to create virtual browser profiles. You can filter these profiles based on your requirements.

fingerprints = client.fingerprint.search_fingerprints(
    device_type='desktop',
    browser_product='chrome',
    browser_version='>134',
)

5.2 Configure Proxy Settings

Create a new browser profile with the selected base profile and configure it to use Massive Proxies.

PROXY_HOST = os.getenv('PROXY_HOST', 'network.joinmassive.com')
PROXY_PORT = int(os.getenv('PROXY_PORT', '65534'))
PROXY_USERNAME = os.getenv('PROXY_USERNAME', '<your_proxy_username>')
PROXY_PASSWORD = os.getenv('PROXY_PASSWORD', '<your_proxy_password>')

create_profile_request = CreateProfileRequest(
    fingerprint_id=fingerprints[0].id,
    name='Massive + Kameleo Profile',
    proxy=ProxyChoice(
        value='http',
        extra=Server(host=PROXY_HOST, port=PROXY_PORT, id=PROXY_USERNAME, secret=PROXY_PASSWORD)
    ))
profile = client.profile.create_profile(create_profile_request)

Replace PROXY_USERNAME and PROXY_PASSWORD with your Massive Proxy credentials.

Step 6: Launch the Browser

Start/stop the browser profile using the following code:

# Start the browser profile
client.profile.start_profile(profile.id)

# Wait for 10 seconds
time.sleep(10)

# Stop the browser by stopping the Kameleo profile
client.profile.stop_profile(profile.id)

Combine All Code

Here’s the complete Python script to create and start a browser profile with Massive Proxies:

from kameleo.local_api_client import KameleoLocalApiClient
from kameleo.local_api_client.models import CreateProfileRequest, ProxyChoice, Server
import time
import os

# This is the port Kameleo.CLI is listening on. Default value is 5050, but can be overridden in appsettings.json file
kameleo_port = os.getenv('KAMELEO_PORT', '5050')

client = KameleoLocalApiClient(
    endpoint=f'http://localhost:{kameleo_port}'
)

PROXY_HOST = os.getenv('PROXY_HOST', 'network.joinmassive.com')
PROXY_PORT = int(os.getenv('PROXY_PORT', '65534'))
PROXY_USERNAME = os.getenv('PROXY_USERNAME', '<your_proxy_username>')
PROXY_PASSWORD = os.getenv('PROXY_PASSWORD', '<your_proxy_password>')

fingerprints = client.fingerprint.search_fingerprints(
    device_type='desktop',
    browser_product='chrome',
    browser_version='>134',
)

create_profile_request = CreateProfileRequest(
    fingerprint_id=fingerprints[0].id,
    name='Massive + Kameleo Profile',
    proxy=ProxyChoice(
        value='http',
        extra=Server(host=PROXY_HOST, port=PROXY_PORT, id=PROXY_USERNAME, secret=PROXY_PASSWORD)
    ))
profile = client.profile.create_profile(create_profile_request)

# Start the browser profile
client.profile.start_profile(profile.id)

# Wait for 10 seconds
time.sleep(10)

# Stop the browser by stopping the Kameleo profile
client.profile.stop_profile(profile.id)

Automate the Browser (Playwright Example)

You can automate the browser using frameworks like Selenium, Puppeteer, or Playwright. Here’s an example using Playwright:

from kameleo.local_api_client import KameleoLocalApiClient
from kameleo.local_api_client.models import CreateProfileRequest
from playwright.sync_api import sync_playwright
import time
import os

# This is the port Kameleo.CLI is listening on. Default value is 5050, but can be overridden in appsettings.json file
kameleo_port = os.getenv('KAMELEO_PORT', '5050')
client = KameleoLocalApiClient(
    endpoint=f'http://localhost:{kameleo_port}'
)

# Search Chrome fingerprints
fingerprints = client.fingerprint.search_fingerprints(
    device_type='desktop',
    browser_product='chrome',
)

# Create a new profile with recommended settings
# Choose one of the fingerprints
create_profile_request = CreateProfileRequest(
    fingerprint_id=fingerprints[0].id,
    name='Kameleo Massive Integration')

profile = client.profile.create_profile(create_profile_request)

# Start the Kameleo profile and connect with Playwright through CDP
browser_ws_endpoint = f'ws://localhost:{kameleo_port}/playwright/{profile.id}'
with sync_playwright() as playwright:
    browser = playwright.chromium.connect_over_cdp(endpoint_url=browser_ws_endpoint)
    context = browser.contexts[0]
    page = context.new_page()
    page.set_viewport_size({"width": 1280, "height": 800})
    
    # Use any Playwright command to drive the browser and enjoy full protection from bot detection products
    page.goto('https://www.joinmassive.com/')
    page.hover("text=Resources")
    page.click("text=Partners")
    page.wait_for_load_state('networkidle')
    page.click("text=Kameleo")

# Wait for 5 seconds
time.sleep(5)

# Stop the browser by stopping the Kameleo profile
client.profile.stop_profile(profile.id)

For more examples, refer to the Kameleo API Examples

Managing Profiles Through GUI

You can manage and monitor your browser profiles using the Kameleo GUI. Simply log in to the Kameleo application and navigate to the Profiles section.

Additional Resources