Appearance
Usage
Minimal examples for both the Node.js and Python SDKs. Both examples follow the same pattern: create a randomized fingerprint profile, add a proxy, launch the browser, navigate to a verification page, read the result, then clean up.
Node.js (Puppeteer)
js
import { GologinApi } from 'gologin';
const gologin = GologinApi({ token: process.env.GL_API_TOKEN });
// Create a new profile with a randomized fingerprint
const profile = await gologin.createProfileRandomFingerprint();
// Optionally attach a residential proxy by region
await gologin.addGologinProxyToProfile(profile.id, 'us');
// Launch the browser; returns a Puppeteer Browser instance
const { browser } = await gologin.launch({ profileId: profile.id });
const page = await browser.newPage();
// Navigate and extract content
await page.goto('https://iphey.com/', { waitUntil: 'networkidle2' });
const status = await page.$eval('.trustworthy-status', el => el.textContent.trim());
console.log('Trustworthiness:', status);
// Clean up
await browser.close();
await gologin.deleteProfile(profile.id);Run it:
bash
GL_API_TOKEN=your_token_here node index.jsPython (Selenium)
python
import os
from gologin import GoLogin
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
gl = GoLogin({
"token": os.environ.get("GL_API_TOKEN"),
})
# Create a new profile with a randomized fingerprint
profile_id = gl.createProfileRandomFingerprint()
# Start the browser and get the debugger address
debugger_address = gl.start()
options = Options()
options.add_experimental_option("debuggerAddress", debugger_address)
driver = webdriver.Chrome(options=options)
driver.get("https://iphey.com/")
driver.implicitly_wait(5)
status = driver.find_element("css selector", ".trustworthy-status").text
print("Trustworthiness:", status)
driver.quit()
gl.stop()
gl.deleteProfile(profile_id)Run it:
bash
GL_API_TOKEN=your_token_here python3 main.pyCloud Browser (Puppeteer via API)
For fully headless cloud sessions without a local desktop app:
js
import { GologinApi } from 'gologin';
const gologin = GologinApi({ token: process.env.GL_API_TOKEN });
const profile = await gologin.createProfileRandomFingerprint();
// cloud: true routes the session through GoLogin cloud infrastructure
const { browser } = await gologin.launch({ profileId: profile.id, cloud: true });
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.close();
await gologin.deleteProfile(profile.id);Key API Methods
| Method | Description |
|---|---|
createProfileRandomFingerprint() | Generate a new isolated profile with random fingerprint |
addGologinProxyToProfile(id, region) | Attach a GoLogin residential proxy by country/region code |
launch({ profileId }) | Start a browser session for the profile; returns Puppeteer Browser |
deleteProfile(profileId) | Delete the profile and release cloud resources |