API Gemlogin là giao diện lập trình ứng dụng mạnh mẽ, cho phép bạn điều khiển và tích hợp nền tảng Antidetect Browser của Gemlogin hoàn toàn qua mã nguồn. Với Gemlogin API, việc khởi tạo, cấu hình, khởi chạy, theo dõi và đóng các profile trình duyệt được thực hiện nhanh chóng thông qua các HTTP endpoint, không cần thao tác GUI. Điều này mở ra cơ hội:
- Automação: Xây dựng workflow, chạy hàng loạt profile song song.
- Tích hợp linh hoạt: Kết nối với hệ thống CRM, ERP, Google Sheets, hay bất kỳ hệ thống bên thứ ba.
- Mở rộng quy mô: Dễ dàng quản lý hàng nghìn profile với fingerprint khác nhau.
1. Xác thực & Cấu hình chung
Mọi request tới Gemlogin API đều yêu cầu header xác thực:
httpCopyEditAuthorization: Bearer <YOUR_API_TOKEN>
Content-Type: application/json
- Bearer Token: Lấy trong trang Dashboard của Gemlogin.
- Timeout: Mặc định 60s, có thể tùy chỉnh theo nhu cầu ứng dụng.
- Định dạng dữ liệu: JSON cho cả request và response.
2. Các endpoint chính

2.1. Browser Versions
GET /api/browser_versions
Lấy danh sách các phiên bản trình duyệt (Chrome, Firefox…) đang hỗ trợ. jsonCopyEdit[ { "id": "chrome_100", "name": "Chrome", "version": "100.0.4896.127" }, { "id": "firefox_98", "name": "Firefox", "version": "98.0" } // … ]
2.2. Groups
GET /api/groups
Truy vấn danh sách Group profile, tiện cho việc phân loại và gán cấu hình chung. jsonCopyEdit[ { "id": "grp1", "name": "US Customers" }, { "id": "grp2", "name": "Testers" } ]
2.3. Profiles
- Danh sách & Chi tiết
GET /api/profiles
Lấy về toàn bộ profile đã tạo.GET /api/profile/{id}
Lấy chi tiết profile theo{id}
.
- Tạo & Cập nhật
POST /api/profiles/create
Tạo mới profile với payload ví dụ: jsonCopyEdit{ "name": "FB-Account-1", "browserVersion": "chrome_100", "proxy": { "host": "1.2.3.4", "port": 8000, "username": "", "password": "" }, "fingerprint": "default", "timezone": "America/New_York" }
POST /api/profiles/update/{profile_id}
Cập nhật cấu hình profile đã tồn tại (proxy, fingerprint, timezone,…).
- Xóa & Đổi fingerprint
GET /api/profiles/delete/{id}
Xóa profile theo ID.GET /api/profiles/changeFingerprint
Đổi mới fingerprint cho một hoặc nhiều profile, giúp tránh bị track dài hạn.
- Khởi chạy & Đóng browser instance
GET /api/profiles/start/{id}
Spawn một browser instance từ profile.- Response: URL WebSocket để điều khiển (Puppeteer, Playwright…).
GET /api/profiles/close/{id}
Đóng (kill) phiên bản browser đang chạy của profile.
3. Cách sử dụng API trong thực tế
Ví dụ 1: Tạo & Chạy Profile
bashCopyEdit# 1. Tạo profile mới
curl -X POST https://api.gemlogin.io/api/profiles/create \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name":"MyProfile01",
"browserVersion":"chrome_100",
"proxy":{"host":"proxy.my.com","port":3128},
"fingerprint":"random"
}'
# 2. Khởi chạy profile vừa tạo
curl -X GET https://api.gemlogin.io/api/profiles/start/{PROFILE_ID} \
-H "Authorization: Bearer $TOKEN"
Ví dụ 2: Chạy hàng loạt với Script Node.js
javascriptCopyEditconst axios = require('axios');
const API = 'https://api.gemlogin.io/api';
const token = process.env.GEMLOGIN_TOKEN;
async function runProfile(profileId) {
const { data } = await axios.get(`${API}/profiles/start/${profileId}`, {
headers: { Authorization: `Bearer ${token}` }
});
console.log('WebSocket URL:', data.wsUrl);
// Tiếp tục điều khiển browser qua Puppeteer/Playwright...
}
(async () => {
// Lấy danh sách profile
const { data: profiles } = await axios.get(`${API}/profiles`, {
headers: { Authorization: `Bearer ${token}` }
});
for (let p of profiles) {
await runProfile(p.id);
}
})();
4. Quản lý & Giám sát
- Logs: Sử dụng endpoint tương tự
GET /api/logs/{run_id}
(nếu có) hoặc qua SDK để lấy chi tiết debug. - Resource Status: Cập nhật trạng thái profile (“Active”, “Inactive”, “Invalid”) để đồng bộ với hệ thống nghiệp vụ.
5. Tips & Best Practices
- Rate Limit: Mặc định ~100 request/phút, nếu cần cao hơn hãy liên hệ support.
- Retry Logic: Xử lý lỗi 5xx với cơ chế retry/backoff.
- Fingerprint Rotation: Kết hợp
changeFingerprint
định kỳ để tăng tính ngẫu nhiên. - Group-based Config: Tạo nhiều group theo khu vực hoặc theo use-case để dễ quản lý.
Concluir
Com API Gemlogin, bạn hoàn toàn chủ động trong việc tích hợp, mở rộng e tối ưu quy trình tự động hóa trình duyệt Antidetect. Từ việc thao tác profile, quản lý fingerprint, đến khởi chạy và đóng browser instance—mọi thao tác đều có thể thực hiện qua dòng lệnh hay code. Hãy bắt đầu triển khai API Gemlogin ngay hôm nay để nâng cao hiệu suất, giảm thiểu công sức vận hành và tối ưu chi phí cho dự án của bạn!
Tài liệu: https://manual-gemlogin-vn.gitbook.io/gemlogin/tai-lieu-api/api
Site: gemlogin.vn