Contact Us
If you still have questions or prefer to get help directly from an agent, please submit a request.
Popular topics: Multilogin X, Multilogin 6, Subscription & payments,
-
Will Multilogin work on your device? Check our system requirements Mastering Multilogin X: a beginner’s handbook Multilogin X support & resources: how to get help fast How to buy a Multilogin X subscription How to navigate Multilogin X interface Multilogin X made easy: your 3-step guide to getting started How to sync Multilogin 6 subscription with Multilogin X How to transfer profiles to Multilogin X from other apps How to connect the agent in Multilogin X How to create and launch your first profile in Multilogin X Stay undetected: 4 key steps to safe multiaccounting with Multilogin X How to warm up a profile in Multilogin X Getting started with Multilogin X FAQHow agent and launcher work together in Multilogin X How to connect the agent in Multilogin X How to auto-launch the agent How to check and update the agent version in Multilogin X How to disconnect and reconnect the agent in Multilogin X How to uninstall the agent in Multilogin X How to manage agent logs in Multilogin XHow to use bulk actions in Multilogin X How to use a trash bin in Multilogin X How to create and launch your first profile in Multilogin X How to launch and stop profiles in Multilogin X How to install browser extensions in Multilogin X How to export and import profiles in Multilogin X How to use Quick profiles in Multilogin X How to use Android profiles in Multilogin X Profile management FAQMastering multi-accounting: the right way to use cookies How to use Cookie import in Multilogin X How to use Cookie export in Multilogin X How to use Pre-made cookies in Multilogin X How to launch CookieRobot using Script Runner Why don’t cookies log you in to the target account? Why isn't cookie import working? How to run CookieRobot in Multilogin CLIHow to choose the right proxy type How to test a proxy What you need to know about Multilogin proxy: FAQ How to use Multilogin proxy: guide How to use HTTP and SOCKS proxies in Multilogin X How to use Multilogin with 4G/5G connection How to set up Multilogin with NodeMaven How to use custom DNS in Multilogin How to fix profile launch or proxy connection issues How to fix “Profile failed to start” error How to fix “Wrong proxy data” error How to fix “ERR_TIMED_OUT” error How to fix “ERR_CONNECTION_RESET” error How to fix “ERR_CONNECTION_CLOSED” error How to fix IP leaks when using a proxy Proxies & IP masking FAQHow to adjust location settings in Multilogin X How to adjust software settings in Multilogin X How to adjust hardware settings in Multilogin X How to adjust screen resolutions in Multilogin Think before you switch: the truth about fingerprint mismatches Passive OS fingerprint masking (TCP/IP fingerprint) in Multilogin Should my font hash change in Multilogin? How to fix browser fingerprint inconsistencies How to replace Mimic icon in Multilogin on Windows Fingerprinting myths: what websites actually trackHow to fix "Your Windows system cannot perform the necessary WinAPI calls to launch Stealthfox browser" error How to fix “Failed to get profile data” error How to fix “Access denied” error How to fix “Aw, Snap! STATUS_BREAKPOINT” error How to fix “Aw, Snap! STATUS_ACCESS_VIOLATION” error How to fix “ERR_CONNECTION_CLOSED” error How to fix “ERR_TIMED_OUT” error How to fix “ERR_CONNECTION_RESET” error How to fix “Some settings were reset” error How to fix “Profile failed to start” error How to fix “Plan limits reached” error How to fix “Wrong proxy data” error How to fix "Restricted by plan" error How to fix "Too many requests" errorBrowser core update is stuck? Try these solutions My app or profile is slow: how to fix performance issues Account banned: what should I do? Why isn't cookie import working? Why don’t cookies log you in to the target account? How to enable web camera in Multilogin profiles How to unlock a locked profile How to find missing profiles How to fix missing browser data issue How to fix startup issues in Multilogin How to fix Multilogin issues on macOS How to fix agent connection issues How to fix profile launch or proxy connection issues How to fix connection issues in restricted regions How to fix website loading issues in Multilogin How to fix Mimic launch issues on Linux How to fix browser fingerprint inconsistencies How to fix small Stealthfox window resolution on Windows How to fix IP leaks when using a proxyRetrieving the token Using the automation token in a workspace Logging in to Multilogin automatically Exporting proxy details from profiles Converting external proxy lists into API-ready JSON files How to launch CookieRobot using Script Runner Script to create pre-configured profile templates How to auto-launch the agent
-
Mastering Multilogin 6: a beginner’s handbook How to install Multilogin 6 on Linux How to transfer profiles between Multilogin 6 accounts How to set up default profile settings in Multilogin 6 How to customize a profile in Multilogin 6 How to use Quick edit sidebar in Multilogin 6 How to use Android profiles in Multilogin 6 How to install browser extensions in Multilogin 6 How to use CookieRobot in Multilogin 6 How to use Human typing emulation in MultiloginHow to send logs to support How to edit the app.properties file How to reinstall app components How to reinstall Multilogin 6 How to fix profile launch issues in Multilogin 6 How to fix proxy connection issues in Multilogin 6 How to fix frozen "Update in progress... Loading [3] of 2 components" status How to fix Android profile issues in Multilogin 6 How to fix issues with extension data in Mimic How to fix a profile stuck on “Active” status How to fix IP leaks when using a proxy How to fix "JavaScript error" in Multilogin 6 dark mode How to fix "Javax.crypto […] pad block corrupted" error How to fix "Fingerprint composition failed" error How to fix "Mimic/Stealthfox executable is not found" error How to fix “Profile is not created/updated” error How to fix "Downloading Mimic browser" error How to fix “Application request limit is reached” error How to fix "Invalid buffer arguments" error How to fix “Unable to save profile: User-Agent is empty” error How to fix "Cannot invite existing user" error Why don’t cookies log you in to the target account? Why isn't cookie import working?
-
How to choose the perfect Multilogin plan How to buy a Multilogin X subscription How to change a subscription How to renew a subscription How to cancel a subscription How to change a payment method How to manage invoices How to pay with crypto How to sync Multilogin 6 subscription with Multilogin X Subscription & payments FAQ
- Home
- Multilogin X
- Automating tasks with API
- Converting external proxy lists into API-ready JSON files
Converting external proxy lists into API-ready JSON files

Written by Yelena Varabyeva
Updated on September 6th, 2024
Table of contents
In this article, we'll show you how to convert your external proxy lists into API-ready JSON files. This approach allows you to save all your credentials in a convenient JSON format, making it easier to integrate with API endpoints.
Before you start
- Ensure you have a Python environment set up with the following packages installed:
- json
- re
- Save the script
json_proxy_list
in your desired folder
json_proxy_list
import json
import re
# Input the proxy list path here, if any.
file_path = "C:/Users/.../input_list.txt"
# Paste the proxy list here. Supported separators: comma, bar, space, newline
paste_list = """
host:port:username:password
"""
# Reading the proxies from the file path, if any
def read_proxies_from_file(file_path):
try:
with open(file_path, 'r') as file:
return file.read()
except Exception as e:
print("Error reading file - please check your file PATH.")
print(f'Exception found: {e}')
return
# User input needed: proxy type (HTTP/SOCKS5)
def get_proxy_type():
print("Enter the proxy type:")
print("(1) HTTP")
print("(2) HTTPS")
print("(3) SOCKS5")
choose_type = input()
if choose_type == "1":
proxy_type = "http"
elif choose_type == "2":
proxy_type = "https"
elif choose_type == "3":
proxy_type = "socks5"
else:
print("Invalid proxy type. Enter a valid option number.")
return get_proxy_type()
return proxy_type
# Detect line separator from block of credentials
def get_line_separator(proxy_list):
# Detect the most common line separators
separators = ['\n', ',', '/', ' ']
separator_counts = {sep: proxy_list.count(sep) for sep in separators}
sorted_separators = sorted(separator_counts, key=separator_counts.get, reverse=True)
most_likely_separator = sorted_separators[0]
# Handle double values such as '\n,' by checking combinations of common separators
combined_separators = ['\n,', ',\n', '\n/', '/\n', '\n ', ' \n', ', ', ' ,', '/ ', ' /']
for combo in combined_separators:
if combo in proxy_list:
return combo
return most_likely_separator
# Main Function - Inputs user for preferred proxy list source
def main():
# Select proxy list source
print("Select the list source:")
print("(1) from TEXT")
print("(2) from PATH")
choice = input()
# Take action based on the script source
if choice == '2':
proxy_list_content = read_proxies_from_file(file_path)
if proxy_list_content is None:
return
else:
proxy_list_content = paste_list
# Check if HTTP/SOCKS5
proxy_type = get_proxy_type()
# Split the proxy list based on detected separator
proxy_lines = re.split(r'[\n, /]+', proxy_list_content.strip())
# Add the proxy type to each line
proxy_lines = [f"{proxy_type}:{line.strip()}" for line in proxy_lines if line.strip()]
# Create JSON object that is similar to API output for easy future integration
proxies_json = {
"proxies": {
"proxy": []
}
}
# For each proxy line contained in the proxy list, take each proxy element to assign it.
for line in proxy_lines:
parts = line.split(':')
if len(parts) != 5:
print(f"Skipping invalid line: {line}. Please check your proxy credentials file.")
continue
proxy = {
"type": parts[0],
"host": parts[1],
"port": parts[2],
"username": parts[3],
"password": parts[4]
}
proxies_json["proxies"]["proxy"].append(proxy)
# Create the JSON.dumps, save it on proxies.json file.
with open('proxies.json', 'w') as json_file:
json.dump(proxies_json, json_file, indent=2)
print("File proxies.json was written succesfully.")
if __name__ == "__main__":
main()
Running the script
- Open your terminal and navigate to the folder containing the script
- Run the script
json_proxy_list
- Choose the proxy details list source you need:
- On line 5, paste the
.txt
file path, or - On line 8, paste the proxy details string
- On line 5, paste the
- Select the proxy type: external proxy credentials generally don’t include a proxy type, so this will correctly append the type to all proxy lines
- Check the results in the file
proxies.json
stored in the same folder