Skip to content

Proxy API Bulk Import to Fingerprint Browsers: Buy by Script

A script can buy, list and hand over a hundred static IPs while you do something else. This guide shows the three calls and where each fingerprint browser needs care.

Three steps: buy, read back, import

The purchase call returns one IP for each request, so a bulk order is a loop. The loop must stop at the first failure (for example low balance or no stock), because every call spends wallet balance. The console behaves the same way: with a Quantity of 1 to 100 it buys the IPs one by one and stops at the first failure.

After the purchases, the list call gives every active static IP with its login line. The last step is the fingerprint browser: each one has its own local API and its own limits, summarised in the table below.

AdsPower and BitBrowser local APIs side by side

AdsPower and BitBrowser local APIs side by side
ItemAdsPowerBitBrowser
Where the address ishttp://local.adspower.net:50325/ by default; the port may change, read it in the Local API settingsNot fixed in the documentation: read the local API URL in the system settings after logging in
Call that stores proxiesPOST /api/v2/proxy-list/create with type, host, port, user, password, remarkNo separate list call in what we read; proxies are set on the window with /browser/update or, for existing windows, /browser/proxy/update
Attach a proxy to a profilePOST /api/v2/browser-profile/create with user_proxy_config, or proxyid for a saved proxy (or "random")POST /browser/update with proxyMethod 2, proxyType, host, port, proxyUserName, proxyPassword; an empty id creates a window
Limits stated in the documentation500 proxies per Add proxy call; 1 request per second for all APIsAll requests are POST with a body; several window fields are required when creating

Read from each product's own documentation on 15 November 2026; versions change, so check the pages before you rely on a field. Proxy302 has a formal partnership with AdsPower; BitBrowser is listed here only as a second example.

How to run it with Proxy302

  1. Step 1: Top up and create a key

    Top up the wallet, then create an API key on the API keys page of the console. The key has an id and a secret; keep both out of scripts you commit, for example in environment variables.

  2. Step 2: Test with one purchase

    Run the script below with a count of 1, then open My assets (the console page that holds everything you bought) and confirm the IP is there with the protocol you asked for.

  3. Step 3: Run the batch

    Choose a new batch label for each run. If the script stops, run it again with the same label: the keys already used do not buy a second time.

  4. Step 4: Export the lines

    Run the list script. It writes proxies.txt with one host:port:username:password line per active static IP.

  5. Step 5: Import into the browser

    Load one line first, open a profile with it and check the exit at https://ipinfo.io/json, then send the rest. Keep one IP for one account.

Buy static IPs in a loop (Python)

import os, sys, requests

BASE = "https://proxy302.com/open_api/v3"
AUTH = (os.environ["P302_KEY_ID"], os.environ["P302_KEY_SECRET"])  # API key id and secret

def call(method, path, **kw):
    body = requests.request(method, BASE + path, auth=AUTH, timeout=30, **kw).json()
    if body.get("code") != 0:                      # every answer is HTTP 200; code 0 = success
        raise SystemExit(f"{path}: code={body.get('code')} msg={body.get('msg')}")
    return body["data"]

print(call("GET", "/user/users/wallet"))                    # balance in PTC
print(call("GET", "/proxy/payway/static_residential"))      # plans: pick the payway_id of your term

COUNTRY_ID = 233                    # United States; ids come from GET /proxy/area/country?name=...
PAYWAY_ID = int(sys.argv[1])        # plan id printed above
COUNT = int(sys.argv[2])            # keep it small the first time
BATCH = sys.argv[3]                 # one label per batch, e.g. nov15a

for i in range(COUNT):
    data = call("POST", "/proxy/api/proxy/static/ip", json={
        "country_id": COUNTRY_ID,
        "payway_id": PAYWAY_ID,
        "protocol": "http",         # fixed per IP at purchase time
        "is_data_center": False,
        "idempotency_key": f"{BATCH}-{i:04d}",   # same key on a retry = no second purchase
    })
    print(i, data["token_id"], data["host"], data["port"])

Example only. Set P302_KEY_ID and P302_KEY_SECRET first, run with the plan id, a small count and a batch label, for example: python buy.py 12 1 nov15a.

Export the login lines (Python)

import os, requests

BASE = "https://proxy302.com/open_api/v3"
AUTH = (os.environ["P302_KEY_ID"], os.environ["P302_KEY_SECRET"])

rows, cursor = [], None
while True:
    params = {"page_size": 200, "status": 1, "sort_field": "created_on", "sort": "desc"}
    if cursor:
        params["cursor"] = cursor
    body = requests.get(BASE + "/proxy/tokens/static/ip", params=params, auth=AUTH, timeout=30).json()
    if body["code"] != 0:
        raise SystemExit(body["msg"])
    rows += body["data"]["data"]
    cursor = body["data"].get("next_cursor")
    if not body["data"].get("has_more") or not cursor:
        break

with open("proxies.txt", "w", encoding="utf-8") as f:
    for r in rows:
        f.write(r["ads_proxy_url"] + "\n")     # host:port:username:password
print(len(rows), "active static IPs written to proxies.txt")

Example only. ads_proxy_url and the paging fields are described in the developer API reference.

Send the lines to AdsPower (Python)

import requests

ADS = "http://local.adspower.net:50325"     # the port can change: see Local API in the AdsPower settings
items = []
for line in open("proxies.txt", encoding="utf-8"):
    host, port, user, pwd = line.strip().split(":", 3)
    items.append({
        "type": "http" if port == "2222" else "socks5",   # Proxy302: HTTP on 2222, SOCKS5 on 3333
        "host": host, "port": int(port), "user": user, "password": pwd,
        "remark": "proxy302",
    })

# AdsPower: at most 500 proxies per call and 1 request per second.
# Check the body shape against the Add proxy page and try with one line first.
print(requests.post(ADS + "/api/v2/proxy-list/create", json=items[:1], timeout=30).json())

Illustrative. The AdsPower page lists the fields but shows no body example, so test with one line and read the answer before sending 500.

When a call fails

Purchase answers code 50301

Check Read msg: it says whether the balance is too low, the country has no stock, or the key is not yet linked to a Proxy302 account.

Fix Top up or choose another country or term, then run again with the same batch label. Stock changes daily and is shown on the order page.

Stop when If it repeats with a funded wallet and stock, send the msg and your order number to support.

Code 401

Check The key id or secret is wrong, or the account password was used instead of an API key.

Fix Create a key on the API keys page and use its id and secret as the Basic login.

Stop when Do not retry in a loop: a wrong key never starts working.

A retry bought more IPs than planned

Check The retry used a new idempotency_key. The same key replays the earlier order; a new key is a new purchase.

Fix Build the key from the batch label and the counter, as in the script, and never from the clock.

Stop when Count the rows in My assets before the next run.

AdsPower answers code -1

Check Check that the Local API is on, the port matches the settings, you stay under 1 request per second and the body follows the Add proxy page.

Fix Send one proxy by itself and read the msg; then send in groups of up to 500 with a pause between calls.

Stop when If one line fails alone, check its host, port and login against My assets.

Prices and limits

A static ISP IP costs US$0.50 for one day and US$7.99 for 30 days, about US$0.27 per day, and the price is the same in every country. A datacenter IP costs US$0.25 for one day and US$3.99 for 30 days. Each IP is issued with one protocol, HTTP on port 2222 or SOCKS5 on port 3333 of proxy.proxy302.com. The console takes a Quantity of 1 to 100 per order. Auto-renew is optional and set per IP; a purchase made in the console has it on by default, so check the setting on the IPs a script bought and switch it off in My assets if you do not want it. There is no free trial, and the smallest purchase is one IP for one day.

Frequently asked questions

Can I buy static IPs by API?

Yes. The static IP endpoint of the open API buys one IP per call from the wallet, with a country, a plan id and a protocol. The full list of endpoints is in the developer docs.

How many IPs can one call buy?

One. The count and format parameters belong to the dynamic endpoints. For static IPs, loop over the call, or use the console order form with a Quantity of 1 to 100.

What does the ads_proxy_url field contain?

The login line as host:port:username:password, which is the order most fingerprint browsers accept for pasted proxies. Check the order in your browser before a large paste.

Does a script need a different key from the console?

The API key is made on the API keys page and is separate from the account password. Use it as the HTTP Basic login on every call.

Can the same script work for BitBrowser?

The purchase and list steps are the same. Only the last step changes, because BitBrowser sets proxies on windows through its own /browser/update call with the fields in the table above.

View all partners →

Reference links

7
  1. Proxy302 product facts and price list

    Product observation · Confirmed on:

    Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): prices in US$ (1 PTC = US$1), lease terms, protocols and ports, quantity limits, no free trial.

  2. Proxy302 developer API reference (llms-full.txt)

    Official documentation · Confirmed on:

    Read on 15 November 2026: authentication is HTTP Basic with the API key id and secret; every answer is HTTP 200 with code, msg and data and success is code 0; the static IP purchase endpoint takes country_id, payway_id, protocol and an idempotency_key of 8-128 characters; the asset list returns ads_proxy_url as host:port:username:password; error code 50301 covers low balance and no stock.

  3. AdsPower Local API: Add proxy

    Official documentation · Confirmed on:

    Read on 15 November 2026: POST /api/v2/proxy-list/create with type, host, port, optional user, password, remark; "A maximum of 500 proxies can be added at a time"; success answers code 0 and a list of proxy ids. The page shows no request-body example.

  4. AdsPower Local API: New Profile V2

    Official documentation · Confirmed on:

    Read on 15 November 2026: POST /api/v2/browser-profile/create needs group_id and fingerprint_config, and either user_proxy_config or proxyid (a saved proxy id, or "random").

  5. AdsPower Local API README (GitHub)

    Official documentation · Confirmed on:

    Read on 15 November 2026: default address http://local.adspower.net:50325/ or http://localhost:50325/ and the port "might change"; access frequency limit of 1 request per second for all APIs; turn the Local API on under Account Management, Setting, Local API.

  6. BitBrowser documentation: browser interface

    Official documentation · Confirmed on:

    Read on 15 November 2026: POST /browser/update creates a window when id is empty and edits it when id is given; proxy fields proxyMethod (2 = custom), proxyType (noproxy, http, https, socks5), host, port, proxyUserName, proxyPassword; /browser/proxy/update changes proxies in batch.

  7. BitBrowser documentation: local service guide

    Official documentation · Confirmed on:

    Read on 15 November 2026: install and log in to the browser, then read the local API URL in the system settings; every request is a POST with the parameters in the body.

Ready to try it?

Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.