10% off ALL new Proxies – CODE: 10pro

Apify Proxy Setup: Route Actors via a German Mobile IP

Apify Proxy Setup: Route Actors via a German Mobile IP

Direct Answer

To use a custom mobile proxy with Apify, pass your endpoint to ProxyConfiguration via the proxyUrls option (Apify SDK / Crawlee) instead of Apify Proxy. Every actor request then routes through your German mobile IP. With one dedicated endpoint you list a single proxyUrls entry and rotate on demand at the proxy — no pool tier needed.


Why ProxyConfiguration Is the Right Hook

Apify's whole proxy layer runs through one object: ProxyConfiguration. Whether you use the Apify SDK (Actor.createProxyConfiguration) or Crawlee directly (new ProxyConfiguration(...)), it exposes the same proxyUrls option for external proxies. You don't patch low-level HTTP agents or fight the runtime — you hand it one endpoint and every request inherits it.

Most Apify proxy tutorials assume Apify Proxy's rotating residential or datacenter groups, where the platform picks an IP per request. With a dedicated German mobile endpoint, that picking step disappears: you supply a single URL, and you decide when to rotate at the proxy. Three things stay simple — one endpoint, one proxyUrls entry, one place to rotate — instead of juggling group names, country codes and session tiers.

A German mobile IP also changes what your actor looks like. It presents as a real device on a German mobile network behind CGNAT, which carries far higher IP reputation on German sites than a datacenter range. For background on why that matters, see mobile vs residential vs datacenter proxy.


Before You Start

You will need four values from your GermanProxy.io account:

  • Host and port of your endpoint
  • Username and password

The examples use PROXY_HOST, PORT, USER and PASS as placeholders — replace them with your own. There is no SIM, no hardware and no device to configure: this is an IT-routing service, so all you ever handle is a host, a port and credentials. The full endpoint string is always shaped like http://USER:PASS@PROXY_HOST:PORT.


Option A — Crawlee Crawler (most common)

Crawlee is the engine under most modern Apify actors. Pass a ProxyConfiguration with your endpoint in proxyUrls to any crawler class. This example uses PlaywrightCrawler, but the same option works on CheerioCrawler, PuppeteerCrawler and HttpCrawler:

import { PlaywrightCrawler, ProxyConfiguration } from 'crawlee';

const proxyConfiguration = new ProxyConfiguration({
    proxyUrls: ['http://USER:PASS@PROXY_HOST:PORT'],
});

const crawler = new PlaywrightCrawler({
    proxyConfiguration,
    maxConcurrency: 4,
    requestHandler: async ({ page, request, log }) => {
        log.info(`Loading ${request.url}`);
        const title = await page.title();
        log.info(`Title: ${title}`);
    },
});

await crawler.run(['https://www.example.de']);

With a single dedicated endpoint, one entry in proxyUrls is all you need. Crawlee routes every request through your German mobile IP.


Option B — Apify SDK Actor (Actor.createProxyConfiguration)

Inside an actor on the Apify platform, build the same object through the SDK so it fits the actor lifecycle. Actor.createProxyConfiguration accepts the identical proxyUrls option for external proxies:

import { Actor } from 'apify';
import { CheerioCrawler } from 'crawlee';

await Actor.init();

const proxyConfiguration = await Actor.createProxyConfiguration({
    proxyUrls: ['http://USER:PASS@PROXY_HOST:PORT'],
});

const crawler = new CheerioCrawler({
    proxyConfiguration,
    requestHandler: async ({ $, request, log }) => {
        log.info(`${request.url} → ${$('title').text()}`);
    },
});

await crawler.run(['https://www.example.de']);

await Actor.exit();

Store the endpoint as an Apify Secret and read it from an environment variable rather than hard-coding credentials in the actor source.


Option C — Plain HTTP Request (no crawler)

For a one-off fetch or a quick connectivity test, you don't need a crawler at all. The native fetch honours a proxy via an undici ProxyAgent:

import { ProxyAgent } from 'undici';

const dispatcher = new ProxyAgent('http://USER:PASS@PROXY_HOST:PORT');

const res = await fetch('https://api.ipify.org?format=json', { dispatcher });
console.log(await res.json()); // should report a German mobile IP

Verify the IP First

Before you scale to hundreds of requests, point one request at an IP-echo endpoint (such as the fetch snippet above) and confirm it returns a German mobile IP. If it returns your own server address, re-check three things: the proxyUrls value is the full http://USER:PASS@PROXY_HOST:PORT string, the credentials are correct, and the configuration is actually passed into the crawler. A clean setup should also pass a WebRTC-leak and DNS-leak check when you drive a real browser — see test your mobile proxy setup.


Dedicated vs. Apify's Rotating Groups

Aspect Apify Proxy (rotating groups) Dedicated German mobile endpoint
Setup Group name + country code One proxyUrls entry
IP origin Shared residential/datacenter pool Your dedicated German mobile connection
Rotation Per-request, platform-controlled On demand or time-based, you control it
Sticky session Session pool config Native — same IP until you rotate
Geo Country picked per request Always Germany
Billing Per-GB on Apify Fixed plan, fair-use 20 GB/day

A dedicated endpoint trades pool breadth for predictability: one stable German identity, sticky by default, that you rotate when you decide. For the trade-offs, see dedicated vs shared mobile proxy and sticky sessions and IP rotation explained.


Sticky Sessions vs. Rotation

  • Sticky session: keep the same German mobile IP across a multi-step actor flow (login-gated public pages, paginated catalogues, multi-page SERP reads).
  • Rotation on demand: request a fresh IP at the proxy when you want to spread load or start a clean session.

With one endpoint, the IP is sticky by nature — you don't lose it between requests the way a per-request rotating group can. Tune maxConcurrency and request intervals to a human-reasonable rate rather than hammering a target as fast as the runtime allows.


Scrape Responsibly

A mobile proxy improves reliability for legitimate data collection — it is not a tool to circumvent access controls, platform security, or site rules. Keep your Apify runs clean and defensible:

  1. Respect each site's terms and robots.txt — collect public data within the rules, not behind access controls you're not authorised to pass.
  2. Throttle with maxConcurrency and sensible delays so you don't overload servers.
  3. Collect only what you need, and handle any personal data in line with the GDPR — see is web scraping legal in the EU.
  4. Identify your crawler honestly with a truthful user agent, not a misleading one.

Mobile proxies are a standard, legal tool for authorised work like e-commerce price monitoring, market and SEO research and tracking google.de SERPs. For the legal background, see are mobile proxies legal.


FAQ

Can I use my own proxy with Apify instead of Apify Proxy?

Yes. Apify SDK and Crawlee accept any external proxy through ProxyConfiguration's proxyUrls option. Pass your full endpoint as http://USER:PASS@PROXY_HOST:PORT and the actor uses it instead of Apify Proxy — no Apify Proxy subscription required for that traffic.

How do I set a custom proxy URL in a Crawlee crawler?

Create a ProxyConfiguration with { proxyUrls: ['http://USER:PASS@PROXY_HOST:PORT'] } and pass it to your crawler (e.g. PlaywrightCrawler or CheerioCrawler) as the proxyConfiguration option. Crawlee then routes each request through that endpoint.

Do I need a rotating proxy group for one dedicated endpoint?

No. A single dedicated German mobile endpoint goes in proxyUrls as one entry. You rotate on demand at the proxy when you choose, so you don't need Apify's rotating residential groups or a multi-URL list.

Should I use an HTTP or SOCKS5 proxy URL with Apify?

Apify's ProxyConfiguration expects an HTTP/HTTPS proxy URL, so use the http:// endpoint for actor and Crawlee traffic. SOCKS5 is available on the same connection for tools that speak it directly. See SOCKS5 vs HTTP proxy.

Will a German mobile IP help my Apify actor collect German data?

A German mobile IP makes your actor look like a real device on a German mobile network — useful for German SERP tracking, e-commerce price data and localised content. It doesn't exempt you from each site's terms or the GDPR; use it for authorised, public-data collection only.


Related guides

CTA

Run your Apify actors and Crawlee crawlers on real German mobile IPs. Get your German mobile endpoint — HTTP/SOCKS5/OpenVPN, sticky sessions, on-demand rotation, fair-use 20 GB/day, from a transparent EU provider rated 4.8★ on Trustpilot.

Building with other tools? See the guides for Crawlee, Node.js, Selenium, Scrapy and Python.


Get a German mobile proxy: Real 4G/5G IPs from Germany, fair-use 20 GB/day — browse German mobile proxy plans or start with a dedicated 5G proxy.

Telegram Support
Nach oben scrollen