Apify and Crawlee Official Forum

Updated 3 months ago

How to set up Apify Proxy correctly with native Puppeteer?

Hi guys, I want to use Apify Proxy with native Puppeteer JS. Is this the correct setup? Thanks in advance!

INPUT SCHEMA:

"proxyConfiguration": {
"title": "Proxy configuration",
"type": "object",
"description": "Select proxies to be used.",
"prefill": {
"useApifyProxy": true,
"apifyProxyGroups": [],
"country": ""
},
"editor": "proxy"
}


MAIN.JS:

const input = await Actor.getInput();
const { proxyConfiguration } = input;

const browser = await puppeteer.launch({
headless: "new",
proxy: proxyConfiguration
});
A
v
2 comments
just advanced to level 3! Thanks for your contributions! πŸŽ‰
Hi ,
the proxy configuration input as you posted is used in our SDK crawlee.
As you are directly using puppeteer, you need to set the proxy in a different way. You can refer for example to this example: https://docs.apify.com/academy/puppeteer-playwright/proxies
Add a reply
Sign up and join the conversation on Discord