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.

RuntimePython
PlatformVercel
DestinationAPI allowlisting
Fixie productFixie Vercel integration

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.local

Implementation

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

  1. Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
  2. Add both IPs to the API provider.
  3. Deploy the updated Python app on Vercel.
  4. Run a small connection test before sending production traffic.

Related guides

Related docs