Gologin makes one profile with one proxy a two-minute job. Twenty profiles that a script opens, scrapes with, and closes every night is a different job.
This guide shows how to set up proxies and automate Gologin in Python, from the proxy field in the app to a script that runs the profile for you.
You'll check each proxy before Gologin sees it, create profiles through the SDK, and attach Playwright, Selenium, or Puppeteer to a running profile.
If you've followed our BitBrowser automation guide, the flow is the same, with an SDK in place of a local API.
How do you set up proxies and automate Gologin?
To set up proxies and automate Gologin, add your proxy to each browser profile in the app or with the SDK's changeProfileProxy(), then run the profile from code. The Python SDK's start() launches Gologin's Orbita browser and returns a local debugger address. Attach Playwright or Selenium to it, do the work, and call stop() to save the profile.
The app and the SDK work on the same profiles in your account. A profile set up by hand starts fine from a script, and the reverse.

Prerequisites
You need a Gologin plan with API access, Python, and proxy credentials.
- A paid plan or the trial. Gologin's Forever Free plan doesn't include API access. New accounts get a 7-day trial with every feature, which is enough to build and test this.
- Python 3.9+ with
pip install gologin requests playwright selenium webdriver-manager. Skipplaywright install: you attach to Gologin's Orbita browser, which the SDK downloads itself. - Node.js 20+ with
npm i gologin puppeteer-core, only for the Puppeteer section. Version 3 of the Node SDK is ESM-only. - Proxy details: host, port, username, password, and protocol. Gologin speaks HTTP and SOCKS5; HTTP vs HTTPS vs SOCKS5 proxies explains the trade-offs.
Step 1: Set up a proxy in a Gologin profile
On the All profiles page, click the + in the profile's Location column, pick your own proxy (the computer icon), enter IP, port, username, and password, and click Connect.
Gologin picks the protocol for you and checks the proxy straight away. A green indicator means it works, and a red one means it doesn't.
Three other ways to add a proxy:
- Paste a string. Paste
ip:port:login:passwordstraight into the Proxy & Location column. - Profile settings. Click the three dots on the profile, then Settings → Proxy → Your proxy.
- With a change-IP URL. Append the provider's rotation link in brackets:
http://host:port:user:pass[https://your-provider.com/change-ip].
Keep your own proxy when Gologin offers a "Quick fix"
When a third-party proxy fails at launch, Gologin shows Proxy doesn't work with a Quick fix button. That button swaps in a Gologin proxy from the same country.
Click Not now if the profile needs your IP. A silent switch to a different proxy is exactly how an account ends up logging in from an address it has never used.
Add proxies in bulk
For more than a few profiles, go to Proxies in the left menu, click Import proxies, paste one proxy per line, and import.
To assign them, select several profiles, click Proxy in the bulk actions row, paste the list, and click Update proxy. Each profile gets its own line.
Then launch one profile and open a leak test. A WebRTC leak can show your real IP even when the green indicator is on.
Step 2: Create a Gologin API token for your scripts
The SDK and the REST API both authenticate with a token you create in the app under API & MCP → API → New Token.
Store it as an environment variable called GL_API_TOKEN. The token can read, change, and delete every profile in the workspace, so it doesn't belong in a script or a repo.
Every Python example below builds its SDK client through this small helper:
# gl.py
import os
from gologin import GoLogin
TOKEN = os.environ["GL_API_TOKEN"] # API & MCP > API > New Token
def client(profile_id=None, **extra):
"""One GoLogin object per profile; extra keys go straight into the options."""
options = {"token": TOKEN, **extra}
if profile_id:
options["profile_id"] = profile_id # the ID, not the profile name
return GoLogin(options)
extra is where options like extra_params or local go later. The SDK wants the profile's ID, not the name you see in the app, so copy it from the profile's settings.
Step 3: Check the proxy before Gologin sees it
Gologin's SDK has no proxy-check call, so test each proxy yourself with one request through it.
That tells you the exit IP, country, and timezone before you tie the proxy to an account.
import requests
def exit_ip(host, port, user, password):
"""Return the proxy's exit IP, country, and timezone."""
proxy = f"http://{user}:{password}@{host}:{port}"
r = requests.get(
"http://ip-api.com/json/?fields=query,countryCode,timezone",
proxies={"http": proxy, "https": proxy},
timeout=20,
)
r.raise_for_status()
return r.json() # {"query": "...", "countryCode": "US", "timezone": "America/..."}
print(exit_ip("gate.your-provider.com", 8000, "user-country-us", "secret"))
ip-api's free endpoint is plain HTTP, which is fine for a check like this. For a SOCKS5 proxy, install requests[socks] and change the scheme to socks5://.
Step 4: Create a Gologin profile with its proxy from code
createProfileRandomFingerprint() makes a new profile with a generated fingerprint, and changeProfileProxy() attaches your proxy to it.
from gl import client
gl = client() # no profile_id: this client only manages profiles
profile = gl.createProfileRandomFingerprint({"os": "win", "name": "scraper-01"})
profile_id = profile["id"]
gl.changeProfileProxy(profile_id, {
"mode": "http", # http or socks5
"host": "gate.your-provider.com",
"port": 8000,
"username": "user-country-us",
"password": "secret",
})
print("created", profile_id) # keep this ID: every later call needs it
os takes win, mac, or lin, and it should match the machine type the site expects to see. A Windows fingerprint is the safe default for most consumer sites.
To clean up a test profile afterwards, call gl.delete(profile_id). Leftover profiles count against your plan's limit.
Step 5: Start the profile and attach Playwright, Selenium, or Puppeteer
start() downloads Orbita on the first run, launches the profile with its proxy, and returns a debugger address like 127.0.0.1:<port>.
stop() closes the browser and uploads the profile, cookies included, back to Gologin.
The proxy already lives in the profile. Don't pass another one to Playwright or Selenium, or you'll stack two proxies on one connection.
Playwright (Python)
Playwright connects to the debugger address over CDP and reuses the profile's existing context, which holds its cookies and storage.
from playwright.sync_api import sync_playwright
from gl import client
gl = client("your-profile-id")
debugger_address = gl.start() # first run downloads Orbita, so give it a minute
try:
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp("http://" + debugger_address)
context = browser.contexts[0] # the profile's own context, cookies included
page = context.pages[0] if context.pages else context.new_page()
page.goto("https://httpbin.org/ip")
print(page.inner_text("body")) # should print the proxy's exit IP
finally:
gl.stop() # closes Orbita and saves the profile to Gologin
browser.new_context() would give you a blank context without the profile's cookies. Stick with contexts[0], or you lose the logged-in state that made the profile worth having.
Selenium (Python)
Selenium attaches through the same debugger address, with a chromedriver matched to Orbita's Chromium version.
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from gl import client
gl = client("your-profile-id")
debugger_address = gl.start()
driver_path = ChromeDriverManager(driver_version=gl.get_chromium_version()).install()
options = webdriver.ChromeOptions()
options.add_experimental_option("debuggerAddress", debugger_address)
driver = webdriver.Chrome(service=Service(driver_path), options=options)
try:
driver.get("https://httpbin.org/ip")
print(driver.find_element("tag name", "body").text)
finally:
driver.quit()
gl.stop()
get_chromium_version() is the line people skip. Without it, webdriver-manager fetches a driver for your installed Chrome, and Selenium refuses to attach to Orbita's different version.
Puppeteer (Node.js)
The Node SDK's GoLogin class returns a WebSocket URL from start(), which puppeteer-core connects to directly.
// gl-puppeteer.mjs: npm i gologin puppeteer-core (Node 20+; gologin v3 is ESM-only)
import GoLogin from "gologin";
import puppeteer from "puppeteer-core";
const GL = new GoLogin({ token: process.env.GL_API_TOKEN, profile_id: process.argv[2] });
const { wsUrl } = await GL.start();
try {
const browser = await puppeteer.connect({ browserWSEndpoint: wsUrl, defaultViewport: null });
const page = (await browser.pages())[0] ?? (await browser.newPage());
await page.goto("https://httpbin.org/ip");
console.log(await page.evaluate(() => document.body.innerText));
await browser.disconnect(); // detach; GL.stop() closes Orbita
} finally {
await GL.stop(); // uploads the profile; use GL.stopLocal({ posting: false }) to skip
}
defaultViewport: null keeps the window size the fingerprint claims. Puppeteer's default 800×600 viewport doesn't match any real screen the profile says it has.
Step 6: Swap proxies across many profiles
Gologin's REST endpoint PATCH /browser/proxy/many/v2 replaces the proxy on a whole list of profiles in one request.
That's how you rotate IPs or move a fleet to a new provider without starting any profile.
import os
import requests
API = "https://api.gologin.com"
HEADERS = {"Authorization": f"Bearer {os.environ['GL_API_TOKEN']}"}
def swap_proxies(assignments):
"""assignments: (profile_id, host, port, user, password) tuples."""
body = {"proxies": [
{"profileId": pid,
"proxy": {"mode": "http", "host": h, "port": int(p), "username": u, "password": pw}}
for pid, h, p, u, pw in assignments
]}
r = requests.patch(f"{API}/browser/proxy/many/v2", json=body, headers=HEADERS, timeout=60)
r.raise_for_status() # success is a 204 with an empty body
return r.status_code
The next block pairs each profile ID with one host:port:user:pass line, so no two profiles share an IP.
with open("profile_ids.txt") as f:
ids = [line.strip() for line in f if line.strip()]
with open("proxies.txt") as f:
proxies = [line.strip().split(":") for line in f if line.strip()]
pairs = [(pid, *proxy) for pid, proxy in zip(ids, proxies)]
print(swap_proxies(pairs), f"- updated {len(pairs)} profiles")
zip stops at the shorter list, so spare profiles keep their old proxy instead of doubling up. Each proxy object also takes a changeIpUrl if your provider rotates IPs on request.
Is Gologin good for web scraping?
Yes, for pages where who you are matters: logged-in dashboards, sites that tie a session to a fingerprint, or accounts you return to daily.
For bulk public pages it's the expensive way to do it.
Every running profile is a full Chromium process. That memory cost is fine for 10 accounts, and silly for 100,000 product pages that never ask you to log in.
A pattern that works: give each profile a batch of URLs per run, start it once, work through the batch with Playwright, and stop it.
Starting and stopping per URL wastes most of the run on launch time.
What Gologin won't fix for you
Gologin isolates fingerprints and routes each profile through its proxy. It won't rescue a flagged IP or a script that behaves like a script.
- IP reputation. A burned datacenter IP stays burned inside a clean profile.
- Behavior. Hundreds of page loads a minute from one profile reads as a bot whatever the fingerprint says.
- Shared IPs. Twenty profiles on one proxy are twenty accounts a site can link with one query.
Some targets don't need a browser at all. If a site only checks the TLS fingerprint and headers, a browser-impersonating HTTP client costs a fraction of an Orbita process.
In Python, curl_cffi gives you a requests-style API and primp adds Safari and Firefox profiles. In Go, use tls-client; in Node, hellojs.
The same start, attach, stop pattern carries over to BitBrowser and Morelogin, so a script written for one antidetect browser ports to the next in an afternoon.
How I checked this guide
I rebuilt this guide in November 2026 against Gologin's Python SDK documentation, its Node SDK page, and the bulk proxy endpoint reference.
Method names, option keys, and return values in the code come from those pages. All Python and JavaScript blocks pass a syntax check.
Troubleshooting
KeyError: 'GL_API_TOKEN'
Why: The environment variable isn't set in the shell that runs the script.
Fix: Export it first (export GL_API_TOKEN=... on macOS or Linux, setx GL_API_TOKEN ... on Windows), then open a new terminal.
A 401 or 403 from the SDK or the REST API
Why: The token is wrong or deleted, or the workspace is on the Forever Free plan, which has no API access.
Fix: Create a new token under API & MCP → API, and check the plan under Settings & Members → Billing plans.
"session not created: This version of ChromeDriver only supports Chrome version …"
Why: Selenium is using a chromedriver built for your installed Chrome, not for Orbita.
Fix: Pass gl.get_chromium_version() to ChromeDriverManager(driver_version=...) as in Step 5.
The proxy works, but the site still blocks you
Why: The site's bot protection is reacting to the IP's reputation or the script's behavior, not to the connection.
Fix: Identify the protection before you change anything. antibot-detect makes one request and names the vendor (Cloudflare, DataDome, Akamai and others) with the evidence it found.
It's passive, so a clean result doesn't prove a site is unprotected: some defenses only show once JavaScript runs.
Once you know the vendor, how to bypass bot detection covers what to change next.
FAQ
Is the Gologin API available on the free plan?
No. Gologin's Forever Free plan excludes API access, so the SDK and REST calls here need a paid plan. New accounts get a 7-day trial with every feature.
Should I set the proxy in Gologin or in Playwright?
Set it in Gologin. When Playwright attaches with connect_over_cdp, Orbita is already running with the profile's proxy, and Playwright's own proxy option only applies to browsers it launches itself.
Can Gologin profiles run headless?
Yes. Pass extra_params=["--headless"] through the client options. Test the target with a visible window first, because some sites treat headless Chromium differently even with a clean fingerprint.
How do I rotate the IP on a Gologin profile?
Change the session ID in a rotating gateway's username, add your provider's changeIpUrl, or swap the proxy with the bulk endpoint. Then rerun the Step 3 check.
Does stop() upload the profile every time?
Yes, by default stop() saves the profile back to Gologin. For throwaway runs, pass local=True to the Python client, or call stopLocal({ posting: false }) in Node.
Wrapping up
You set up a proxy in a profile by hand, then did the same from Python: check the proxy, create the profile, start it, attach your library, stop it.
The two lines most Gologin scripts get wrong are the contexts[0] in Playwright and the matched chromedriver in Selenium.
Start with one profile and the Playwright script, then use the bulk swap to scale it.