Static IP guide
Making API requests with a static IP from a Python app on Vercel
Vercel's Python runtime supports the requests library, and Fixie slots in as a proxies dict built from the FIXIE_URL the Vercel integration writes into your project. Partner APIs then see one of two fixed addresses regardless of which region or instance served the invocation.
Recommended setup
Use Fixie Vercel integration for HTTP and HTTPS requests to an API, webhook provider, or service that allowlists outbound IP addresses. Store the proxy value in FIXIE_URL, then configure Python to route outbound traffic through Fixie before connecting to API allowlisting.
Set up Fixie on Vercel
Add the Fixie Vercel integration, create a proxy in the Fixie dashboard, and connect it to the Vercel project and environment. The integration can create FIXIE_URL in Vercel Environment Variables for the connected project.
Pull Vercel environment variables locally
vercel env pull
grep FIXIE_URL .env.localImplementation
The example below shows the core application-side change. Keep credentials in environment variables and avoid committing proxy, database, or API secrets.
Make an HTTP request through FIXIE_URL
import os
import requests
proxies = {
"http": os.environ["FIXIE_URL"],
"https": os.environ["FIXIE_URL"],
}
response = requests.get("https://api.example.com/data", proxies=proxies)
print(response.status_code)Good to know
- Import-time setup runs once per cold start; build the proxies dict at module level rather than inside the handler.
- Keep Fixie usage on Vercel Python to HTTP and HTTPS calls — database-style SOCKS tunnels need a long-running process, which serverless functions do not provide.
Allowlist and test the static IPs
- Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
- Add both IPs to the API provider.
- Deploy the updated Python app on Vercel.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Python app on Heroku
- Making API requests with a static IP from a Node app on Vercel
- Making API requests with a static IP from a Python app on Render
- Making API requests with a static IP from a Go app on Vercel
- Making API requests with a static IP from a Python app on Fly.io
- Making API requests with a static IP from a Python app on Koyeb