• Website
  • Server status
  • API documentation
  • Blog
Telegram Icon Community
EN
Русский
Português
English
中文 (中国)
Tiếng Việt
Sign in Start free
  • Website
  • Server status
  • API documentation
  • Blog
  • Community
  • English (US) Русский Português English 中文 (中国) Tiếng Việt
Log in View Plans

Custom Python scripts

Build powerful automation workflows with Python and the Multilogin API. Create, manage, and launch browser profiles with fully customizable scripts.

search icon

Try a different keyword or check for typos. If you still need help, contact support.

  • Getting started with Multilogin automation
  • Basic automation with CLI
  • Low-code automation with Postman
  • Script runner & predefined scripts
  • Puppeteer, Selenium, and Playwright
  • Custom Python scripts
  • Quick solutions with Developer Tools
  • External automation tools
  • Home
  • breadcrumb separator bar
  • Explore features
  • breadcrumb separator bar
  • Efficient task automation with API
  • breadcrumb separator bar
  • Custom Python scripts
  • breadcrumb separator bar
  • How to export proxy details with Python

How to export proxy details with Python

Written by Marcelo B ( Updated on October 18th, 2026 )

Updated on October 18th, 2026

Use this Python script to export the proxy settings stored in Multilogin browser profiles to a JSON file.

Add the profile IDs manually, load them from a JSON file, or use Profile Search → the script sends the IDs to Profile Metas → the exported proxy details are saved as proxy_credentials.json.

Use this when you need the proxy configuration from several browser profiles in a structured file.

Before you start

  1. Make sure Python is installed, then install the two external packages used by the script:
    python -m pip install requests python-dotenv
    The os and json modules are included with Python.
  2. Save the script proxies_to_json.py in your desired folder 

proxies_to_json.py

import os
import json
import dotenv
import hashlib
import requests

dotenv.load_dotenv()

# Credentials are pulled from a local .env file
USERNAME = os.getenv("MLXUSERNAME")
PASSWORD = os.getenv("MLXPASSWORD")

# Insert Your FolderID here
FOLDERID = "91f042e6-xxx-4e1f-adee-5eed6bb47d60"

# Insert your profile_ids.json filepath here
LIST_PATH = "C:/.../files/pid_list.json"

# Paste your string values manually:
LIST_MANUAL = [
    "95f6d02c-xxxx-47c4-b1d4-369801f2a37c",
    "48da90d8-xxxx-40a2-8ccb-2d9e7e3eaebb",
    "e2f9d96a-xxxx-4439-ae74-10beda6bf109",
    "fffca377-xxxx-495e-a408-3a98716e14ea",
    "f3559ca3-xxxx-479c-8a8a-c4b831e8f78b",
    "1c1e09dc-xxxx-4495-979b-7cb805a3a8a1",
    "a66ba910-xxxx-48ac-a6d1-615f996b3a1d",
    "f17140f4-xxxx-47c5-96d5-1b9fd184203b",
    "0a505d93-xxxx-4ba9-bd25-d37bf8bb168d",
]


# API-Related Objects
LOCALHOST = "http://127.0.0.1"
MLX_BASE = "https://api.multilogin.com"
LAUNCHERV1 = "https://launcher.mlx.yt:45001/api/v1"
HEADERS = {"Accept": "application/json", "Content-Type": "application/json"}

# Login Function
def signin() -> str:
    payload = {
        "email": USERNAME,
        "password": hashlib.md5(PASSWORD.encode()).hexdigest(),
    }

    r = requests.post(f"{MLX_BASE}/user/signin", json=payload)

    if r.status_code != 200:
        print(f"\nError during login: {r.text}\n")
        return ""
    else:
        response = r.json()["data"]
        token = response["token"]
        return token


# Search Profiles called "TempName": recently created by the Bulk Create function.
def profile_search():
    url = "https://api.multilogin.com/profile/search"
    body = {
        "is_removed": False,  # Do you wish to search for removed profiles? True/False
        "limit": 100,  # How many profile results do you wish to get?
        "offset": 0,  # Check MLX Documenter page for a full parameter breakdown
        "search_text": "",
        "storage_type": "all",
        "order_by": "created_at",
        "sort": "asc",
    }
    response = requests.request("POST", url, headers=HEADERS, json=body)
    resp_json = json.loads(response.content)
    return resp_json


# Obtain a list of ProfileIDs retrieved by the Profile Search endpoint
def get_profile_ids():
    profile_list = profile_search()

    if profile_list["data"]["total_count"] == 0:
        print("No more profiles found: error in response or end of task.")
        return []
    else:
        if (
            profile_list
            and "data" in profile_list
            and "profiles" in profile_list["data"]
        ):
            profile_ids = [
                profile["id"] for profile in profile_list["data"]["profiles"]
            ]
            return profile_ids
        else:
            print("Error - Please check Get Profile IDs function.")


# Use Profile Metas endpoint to get the Proxy information registrered.
def search_proxy_metas(option_call):
    url = "https://api.multilogin.com/profile/metas"

    if option_call == "1":
        payload = json.dumps({"ids": LIST_MANUAL})

    elif option_call == "2":
        payload = json.dumps({"ids": get_profile_ids()})

    elif option_call == "3":
        with open(LIST_PATH, "r") as file:
            proxies = json.load(file)
        payload = json.dumps({"ids": proxies})
    else:
        print("Invalid option. Restart.")
        return

    response = requests.request("POST", url, headers=HEADERS, data=payload)
    response_object = response.text
    extracted_data = json.loads(
        response_object
    )  # Full Profile Metas object (not only proxies)

    query_result = []

    for profile in extracted_data["data"]["profiles"]:
        proxy_metas = profile["parameters"]["proxy"]
        query_result.append(proxy_metas)

    proxy_json = json.dumps(query_result, indent=4)
    print(proxy_json)

    # Write the JSON with results
    with open("proxy_credentials.json", "w") as json_file:
        json_file.write(proxy_json)

    print(
        f"Total of {len(query_result)} proxies were saved on proxy_credentials.json \n"
    )


# Main function
def main():
    token = signin()
    if token:
        HEADERS.update({"Authorization": f"Bearer {token}"})
    else:
        print("Failed to sign in.")

    option_call = input(
        "\n\n Select method to find proxy list: \n  (1) from PATH \n  (2) from Profile Search \n  (3) Manual List (line 17) \n Write Selection: \n   "
    )

    search_proxy_metas(option_call)


if __name__ == "__main__":
    main()
 
 
  1. Save the .env file in the same folder. 
    1. Add your Multilogin credentials (email and password)
    2. Add the FolderID: you can find this value using our guides on DevTools or Postman

Choose which browser profiles to export

The script can get profile IDs in three ways:

  • Manual list: add specific profile IDs directly to LIST_MANUAL
  • Profile Search: retrieve profiles from the current workspace
  • JSON file: load profile IDs from the file set in LIST_PATH

Running the script

  1. Open your terminal and navigate to the folder containing the script
  2. Run the script proxies_to_json.py
  3. Select the desired input option when prompted

You can choose to input your Profile ID list via path, text, or search, or using the results from the Profile Search endpoint. If using the Profile Search option, adjust the function parameters accordingly.

 
  1. Check the results in the file proxy_credentials.json stored in the same folder

Expected result: the script creates proxy_credentials.json in the same folder and writes one proxy configuration object for each selected browser profile that has stored proxy details.

Make sure that the profiles for this script have proxy details. It is especially important for the second input option, as Profile Search endpoint looks for the first 100 profiles in your workspace by default.

 

 

Was this article helpful?

Give feedback about this article

In this article

  • Before you start
  • proxies_to_json.py
  • Choose which browser profiles to export
  • Running the script

Multilogin community

Stay informed, share your thoughts, and engage with others!

Telegram Icon Join us on Telegram

Read more on the topic

10 Best Datacenter Proxies for Web Scraping (2025 Edition) Apr 2, 2025 5 min read Google SERP Img

What is a Google SERP Proxy and Why Should You Care?

Apr 1, 2025 6 min read
UK Proxy Img

What Are Dedicated UK Proxies? Everything You Need to Know

Apr 1, 2025 6 min read
Related Article Title Icon

Related articles

  • How to import external proxy lists with Python
  • How to run Multilogin API scripts on multiple servers with Python
  • How to use proxy templates
  • How to choose the best automation framework

Mobile

  • Cloud phone
  • Virtual phone
  • Remote phone
  • Phone farming
  • Cloud cell phone
  • Cloud Android emulation
  • AI Quick Action Automation

Multi-accounting

  • Multiple Instagram accounts
  • Multiple Tiktok accounts
  • Multiple Reddit accounts
  • Multiple Telegram accounts
  • Multiple Facebook accounts
  • Multiple Youtube accounts
  • Multiple LinkedIn accounts

COMPARISON

  • Multilogin vs. MoreLogin
  • Multilogin vs. FlashID
  • Multilogin vs. DuoPlus
  • Multilogin vs. VMOS cloud
  • Multilogin vs. Octo Browser
  • Multilogin vs. AdsPower
  • Multilogin vs. GoLogin

Platform proxies

  • Mobile proxy
  • Reddit proxy
  • Instagram proxy
  • TikTok proxy
  • Facebook proxy
  • Youtube proxy
  • LinkedIn proxy

USECASES

  • Cloud phones for Tiktok
  • Cloud phones for Instagram
  • Cloud phones for Reddit
  • Cloud phones for Facebook
  • Cloud phones for Youtube

RESOURCES

  • Knowledge base
  • API documentation
  • Glossary
  • Academy
  • Blog
  • Server status
  • Release notes

FREE TOOLS

  • YouTube views to money calculator
  • Instagram money calculator
  • Online URL to text converter
  • Google local SERP checker
  • Random address generator

GET IN TOUCH

  • Contact 24/7 support
    [email protected]
  • Referral program
  • Affiliate program
  • Pricing page
  • Careers
GDPR Compliant

© 2026 Multilogin. All rights reserved.

  • Privacy policy
  • Terms of service
  • Cookie policy
Multilogin watermark
  • MOBILE

    • Cloud phone
    • Virtual phone
    • Remote phone
    • Phone farming
    • Cloud cell phone
    • Cloud Android emulation
    • AI Quick Action Automation
  • MULTI-ACCOUNTING

    • Multiple Instagram accounts
    • Multiple Tiktok accounts
    • Multiple Reddit accounts
    • Multiple Telegram accounts
    • Multiple Facebook accounts
    • Multiple Youtube accounts
    • Multiple LinkedIn accounts
  • COMPARISON

    • Multilogin vs. MoreLogin
    • Multilogin vs. FlashID
    • Multilogin vs. DuoPlus
    • Multilogin vs. VMOS cloud
    • Multilogin vs. Octo Browser
    • Multilogin vs. AdsPower
    • Multilogin vs. GoLogin
  • PLATFORM PROXIES

    • Mobile proxy
    • Reddit proxy
    • Instagram proxy
    • TikTok proxy
    • Facebook proxy
    • Youtube proxy
    • LinkedIn proxy
  • USECASES

    • Cloud phones for Tiktok
    • Cloud phones for Instagram
    • Cloud phones for Reddit
    • Cloud phones for Facebook
    • Cloud phones for Youtube
  • RESOURCES

    • Knowledge base
    • API documentation
    • Glossary
    • Academy
    • Blog
    • Server status
    • Release notes
  • FREE TOOLS

    • YouTube views to money calculator
    • Instagram money calculator
    • Online URL to text converter
    • Google local SERP checker
    • Random address generator
  • GET IN TOUCH

    • Contact 24/7 support
      [email protected]
    • Referral program
    • Affiliate program
    • Pricing page
    • Careers
GDPR Compliant
  • Privacy policy
  • Terms of service
  • Cookie policy

© 2026 Multilogin. All rights reserved.

Expand