Appearance
Usage
These examples assume the Kameleo Engine is running and reachable at http://localhost:5050.
Python -- Create and Launch a Profile
python
from kameleo.local_api_client import KameleoLocalApiClient
from kameleo.local_api_client.models import CreateProfileRequest
# Connect to the local Engine
client = KameleoLocalApiClient(endpoint='http://localhost:5050')
# Verify the Engine is ready before making calls
client.verify_engine_ready()
# Search for fingerprints matching desktop Windows Chrome 145+
fps = client.fingerprint.search_fingerprints(
device_type='desktop',
os_family='windows',
browser_product='chrome',
browser_version='>145'
)
# Create a browser profile using the first matching fingerprint
profile = client.profile.create_profile(
CreateProfileRequest(fingerprint_id=fps[0].id, name='quick demo')
)
# Launch the profile (opens a real Chroma browser window)
client.profile.start_profile(profile.id)
print(f"Profile {profile.id} started")JavaScript / TypeScript -- Create a Profile and Automate with Playwright
javascript
import { KameleoLocalApiClient } from "@kameleo/local-api-client";
import { chromium } from "playwright";
const client = new KameleoLocalApiClient({ basePath: "http://localhost:5050" });
// Search available fingerprints
const fingerprints = await client.fingerprint.searchFingerprints(
"desktop",
undefined,
"chrome"
);
// Create a profile
const profile = await client.profile.createProfile({
fingerprintId: fingerprints[0].id,
});
// Connect Playwright to the running Kameleo profile via CDP WebSocket
const browser = await chromium.connectOverCDP(
`ws://localhost:5050/playwright/${profile.id}`
);
const page = await browser.contexts()[0].newPage();
await page.goto("https://example.com");
const title = await page.title();
console.log("Page title:", title);
await browser.close();Key Concepts
- Fingerprints are immutable signed objects from the Kameleo cloud. Each fingerprint bundles a consistent set of browser signals (canvas hash, WebGL renderer, navigator platform, screen resolution, font list, timezone) so every profile produces a coherent, non-anomalous fingerprint.
- Profiles wrap a fingerprint with proxy settings, cookies, local storage, and launch options. Profiles are persistent: you can stop and restart them while retaining session state.
- The WebSocket CDP endpoint (
ws://localhost:5050/playwright/<profile-id>) lets Playwright, Puppeteer, or Selenium connect directly to the masked browser without any extra proxy layer. - Fingerprint search returns at most 25 results, ordered by browser version descending. Filter by
device_type,os_family,browser_product, andbrowser_version(supports>145,=130, etc.). - SDK + Engine version parity: keep the
kameleo.local-api-client/@kameleo/local-api-clientversion aligned with the Engine's major.minor to avoid schema mismatches.
Proxy Per Profile
python
from kameleo.local_api_client.models import CreateProfileRequest, ProxyConnectionTypeEnum
profile = client.profile.create_profile(
CreateProfileRequest(
fingerprint_id=fps[0].id,
name='geo-dallas',
proxy=dict(
type=ProxyConnectionTypeEnum.HTTP,
host='proxy.example.com',
port=8080,
username='user',
password='pass',
)
)
)