[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-post-en-using-proxies-in-nodejs":3},{"success":4,"payload":5,"related":83,"errors":155},true,{"id":6,"slug":7,"title":8,"excerpt":9,"body_html":10,"meta_title":11,"meta_description":12,"canonical_url":13,"canonical_override":14,"og_title":15,"og_description":16,"og_image_url":17,"faq_json":18,"key_takeaways":34,"allow_index":40,"noindex_google_only":40,"allow_follow":4,"published_at":41,"updated_at":42,"content_updated_at":43,"featured_image_url":44,"featured_image_alt":14,"card_image_url":45,"reading_time_minutes":46,"author":47,"categories":51,"tags":57,"alternates":69,"locale_paths":81,"views":82},4,"using-proxies-in-nodejs","Using Proxies in Node.js (Axios + Puppeteer + SDK)","Learn how to configure proxies in Node.js with Axios, Puppeteer, Playwright, and the ProxyHat SDK. Includes code examples for rotation, geo-targeting, retries, and concurrent scraping.","\u003Ch2>Why Use Proxies in Node.js?\u003C\u002Fh2>\n\u003Cp>Node.js is one of the most popular runtimes for building web scrapers, API integrators, and automation tools. But if you are sending hundreds or thousands of requests from a single IP address, you will quickly run into rate limits, CAPTCHAs, and outright IP bans. Proxies in Node.js solve this by routing your requests through different IP addresses, making each one appear to come from a unique user.\u003C\u002Fp>\n\u003Cp>Whether you are scraping product prices, monitoring search engine rankings, or collecting public data at scale, proxies are essential infrastructure. In this guide, we will cover everything you need to integrate residential proxies into your Node.js projects using the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FProxyHatCom\u002Fnode-sdk\" rel=\"noopener noreferrer\">ProxyHat Node SDK\u003C\u002Fa>, Axios, Puppeteer, and Playwright.\u003C\u002Fp>\n\u003Cp>If you are still evaluating which proxy type fits your use case, check out our comparison of \u003Ca href=\"\u002Fblog\u002Fresidential-vs-datacenter-vs-mobile-proxies\">residential vs datacenter vs mobile proxies\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2>Installation and Setup\u003C\u002Fh2>\n\u003Ch3>Installing the ProxyHat SDK\u003C\u002Fh3>\n\u003Cp>The fastest way to get started is with the official Node SDK. It uses your API key to build ready-to-use proxy URLs (rotating, sticky, geo-targeted) that you pass to any HTTP client:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>npm install proxyhat\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>You will also want the HTTP clients you plan to use:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>npm install axios puppeteer playwright\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Authentication\u003C\u002Fh3>\n\u003Cp>All ProxyHat proxy connections authenticate via your API credentials. You can find your username and password in the \u003Ca href=\"https:\u002F\u002Fdocs.proxyhat.com\u002F\" rel=\"noopener noreferrer\">ProxyHat dashboard\u003C\u002Fa>. The SDK client takes your API key; \u003Ccode>buildConnectionUrl\u003C\u002Fcode> builds the same URL offline from your proxy username and password:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002F Option 1: SDK client with your API key\nconst { ProxyHat, buildConnectionUrl } = require('proxyhat');\nconst client = new ProxyHat({ apiKey: process.env.PROXYHAT_API_KEY });\nclient.connectionUrl({ country: 'us' }).then((proxyUrl) =&gt; console.log(proxyUrl));\n\u002F\u002F Option 2: Build the URL offline from your proxy credentials\n\u002F\u002F Set PROXYHAT_USERNAME and PROXYHAT_PASSWORD in your .env\nconst offlineUrl = buildConnectionUrl({\n  username: process.env.PROXYHAT_USERNAME,\n  password: process.env.PROXYHAT_PASSWORD,\n  country: 'us',\n});\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Simple GET Request with the SDK\u003C\u002Fh2>\n\u003Cp>The SDK returns a rotating proxy URL; pass it to Node's \u003Ccode>fetch\u003C\u002Fcode> through undici's \u003Ccode>ProxyAgent\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002F npm install undici\nconst { ProxyHat } = require('proxyhat');\nconst { fetch, ProxyAgent } = require('undici');\nconst client = new ProxyHat({ apiKey: process.env.PROXYHAT_API_KEY });\nasync function main() {\n  const proxyUrl = await client.connectionUrl({ country: 'us' });\n  const response = await fetch('https:\u002F\u002Fhttpbin.org\u002Fip', {\n    dispatcher: new ProxyAgent(proxyUrl),\n  });\n  console.log('Status:', response.status);\n  console.log('Body:', await response.text());\n}\nmain().catch(console.error);\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Each new connection through the rotating URL gets a different residential IP. No manual proxy URL formatting required.\u003C\u002Fp>\n\u003Ch2>Using Proxies with Axios\u003C\u002Fh2>\n\u003Cp>Axios is the most popular HTTP client in the Node.js ecosystem. To route Axios requests through ProxyHat, you can either use the SDK's proxy URL or configure Axios directly.\u003C\u002Fp>\n\u003Ch3>Method 1: axios with an HTTPS Proxy Agent\u003C\u002Fh3>\n\u003Cpre>\u003Ccode>const { ProxyHat } = require('proxyhat');\nconst { HttpsProxyAgent } = require('https-proxy-agent');\nconst axios = require('axios');\nconst client = new ProxyHat({ apiKey: process.env.PROXYHAT_API_KEY });\nasync function scrapeWithAxios() {\n  const proxyUrl = await client.connectionUrl({ country: 'us' });\n  const agent = new HttpsProxyAgent(proxyUrl);\n  const response = await axios.get('https:\u002F\u002Fhttpbin.org\u002Fip', {\n    httpAgent: agent,\n    httpsAgent: agent,\n    timeout: 30000,\n  });\n  console.log('IP:', response.data.origin);\n}\nscrapeWithAxios();\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Method 2: Direct Proxy URL\u003C\u002Fh3>\n\u003Cp>If you prefer manual configuration, use the standard proxy URL format with the \u003Ccode>https-proxy-agent\u003C\u002Fcode> package:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const axios = require('axios');\nconst { HttpsProxyAgent } = require('https-proxy-agent');\nconst proxyUrl = 'http:\u002F\u002FUSERNAME:PASSWORD@gate.proxyhat.com:8080';\nconst agent = new HttpsProxyAgent(proxyUrl);\nasync function scrapeWithAxios() {\n  const response = await axios.get('https:\u002F\u002Fhttpbin.org\u002Fip', {\n    httpsAgent: agent,\n    timeout: 30000,\n  });\n  console.log('IP:', response.data.origin);\n}\nscrapeWithAxios();\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Axios Instance with Default Proxy\u003C\u002Fh3>\n\u003Cp>For repeated use, create a pre-configured Axios instance:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const { HttpsProxyAgent } = require('https-proxy-agent');\nconst agent = new HttpsProxyAgent('http:\u002F\u002FUSERNAME:PASSWORD@gate.proxyhat.com:8080');\nconst proxyClient = axios.create({\n  httpsAgent: agent,\n  timeout: 30000,\n  headers: {\n    'User-Agent': 'Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36',\n  },\n});\n\u002F\u002F All requests now go through the proxy\nconst res = await proxyClient.get('https:\u002F\u002Fexample.com');\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Using Proxies with Puppeteer\u003C\u002Fh2>\n\u003Cp>Puppeteer launches a headless Chrome browser, which is ideal for scraping JavaScript-heavy websites. Proxies are configured at the browser launch level.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const puppeteer = require('puppeteer');\nasync function scrapeWithPuppeteer() {\n  const browser = await puppeteer.launch({\n    args: ['--proxy-server=gate.proxyhat.com:8080'],\n    headless: 'new',\n  });\n  const page = await browser.newPage();\n  \u002F\u002F Authenticate with the proxy\n  await page.authenticate({\n    username: 'USERNAME',\n    password: 'PASSWORD',\n  });\n  await page.goto('https:\u002F\u002Fhttpbin.org\u002Fip', {\n    waitUntil: 'networkidle2',\n    timeout: 60000,\n  });\n  const content = await page.evaluate(() => document.body.innerText);\n  console.log('IP:', content);\n  await browser.close();\n}\nscrapeWithPuppeteer();\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Puppeteer with Geo-Targeting\u003C\u002Fh3>\n\u003Cp>To target a specific country, include the country code in your username. ProxyHat uses the format \u003Ccode>USERNAME-country-XX\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>await page.authenticate({\n  username: 'USERNAME-country-de',  \u002F\u002F Route through Germany\n  password: 'PASSWORD',\n});\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Browse all available proxy locations on our \u003Ca href=\"\u002Flocations\">locations page\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2>Using Proxies with Playwright\u003C\u002Fh2>\n\u003Cp>Playwright supports Chromium, Firefox, and WebKit. Proxy configuration is built into the launch options, making it even simpler:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const { chromium } = require('playwright');\nasync function scrapeWithPlaywright() {\n  const browser = await chromium.launch({\n    proxy: {\n      server: 'http:\u002F\u002Fgate.proxyhat.com:8080',\n      username: 'USERNAME',\n      password: 'PASSWORD',\n    },\n  });\n  const context = await browser.newContext();\n  const page = await context.newPage();\n  await page.goto('https:\u002F\u002Fhttpbin.org\u002Fip');\n  const body = await page.textContent('body');\n  console.log('IP:', body);\n  await browser.close();\n}\nscrapeWithPlaywright();\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Playwright with Per-Context Proxies\u003C\u002Fh3>\n\u003Cp>Playwright allows different proxies per browser context, which is useful for multi-account or multi-region scraping:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const browser = await chromium.launch();\n\u002F\u002F US context\nconst usContext = await browser.newContext({\n  proxy: {\n    server: 'http:\u002F\u002Fgate.proxyhat.com:8080',\n    username: 'USERNAME-country-us',\n    password: 'PASSWORD',\n  },\n});\n\u002F\u002F UK context\nconst ukContext = await browser.newContext({\n  proxy: {\n    server: 'http:\u002F\u002Fgate.proxyhat.com:8080',\n    username: 'USERNAME-country-gb',\n    password: 'PASSWORD',\n  },\n});\nconst usPage = await usContext.newPage();\nconst ukPage = await ukContext.newPage();\nawait Promise.all([\n  usPage.goto('https:\u002F\u002Fwww.google.com\u002Fsearch?q=proxy+service'),\n  ukPage.goto('https:\u002F\u002Fwww.google.co.uk\u002Fsearch?q=proxy+service'),\n]);\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Rotating vs Sticky Sessions\u003C\u002Fh2>\n\u003Cp>ProxyHat supports two session modes that serve different scraping needs:\u003C\u002Fp>\n\u003Ctable>\n\u003Ccaption>Rotating vs Sticky Sessions\u003C\u002Fcaption>\n\u003Cthead>\n\u003Ctr>\u003Cth>Feature\u003C\u002Fth>\u003Cth>Rotating\u003C\u002Fth>\u003Cth>Sticky\u003C\u002Fth>\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\u003Ctd>IP per request\u003C\u002Ftd>\u003Ctd>New IP each time\u003C\u002Ftd>\u003Ctd>Same IP for session duration\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Best for\u003C\u002Ftd>\u003Ctd>Large-scale scraping\u003C\u002Ftd>\u003Ctd>Multi-step workflows, login sessions\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Session duration\u003C\u002Ftd>\u003Ctd>N\u002FA\u003C\u002Ftd>\u003Ctd>Up to 30 minutes\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Username format\u003C\u002Ftd>\u003Ctd>\u003Ccode>USERNAME\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>USERNAME-sid-XXXX\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Ch3>Sticky Session Example\u003C\u002Fh3>\n\u003Cpre>\u003Ccode>const { HttpsProxyAgent } = require('https-proxy-agent');\nconst axios = require('axios');\n\u002F\u002F Generate a random session ID\nconst sessionId = 'session_' + Math.random().toString(36).slice(2, 10);\nconst agent = new HttpsProxyAgent(\n  `http:\u002F\u002FUSERNAME-sid-${sessionId}:PASSWORD@gate.proxyhat.com:8080`\n);\n\u002F\u002F All requests with this agent use the same IP\nconst client = axios.create({ httpsAgent: agent, timeout: 30000 });\nconst res1 = await client.get('https:\u002F\u002Fhttpbin.org\u002Fip');\nconst res2 = await client.get('https:\u002F\u002Fhttpbin.org\u002Fip');\nconsole.log(res1.data.origin === res2.data.origin); \u002F\u002F true\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Geo-Targeted Requests\u003C\u002Fh2>\n\u003Cp>Geo-targeting is critical for \u003Ca href=\"\u002Fuse-cases\u002Fserp-tracking\">SERP tracking\u003C\u002Fa>, localized price monitoring, and regional content verification. ProxyHat supports country-level and city-level targeting through your username string:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002F Country targeting\nconst countryAgent = new HttpsProxyAgent(\n  'http:\u002F\u002FUSERNAME-country-jp:PASSWORD@gate.proxyhat.com:8080'\n);\n\u002F\u002F City targeting\nconst cityAgent = new HttpsProxyAgent(\n  'http:\u002F\u002FUSERNAME-country-us-region-new_york-city-new_york_city:PASSWORD@gate.proxyhat.com:8080'\n);\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Check our full list of \u003Ca href=\"\u002Flocations\">available locations\u003C\u002Fa> for supported countries and cities.\u003C\u002Fp>\n\u003Ch2>Error Handling and Retries\u003C\u002Fh2>\n\u003Cp>Network errors are inevitable when working with proxies at scale. A robust retry strategy is essential for production scrapers:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>const axios = require('axios');\nconst { HttpsProxyAgent } = require('https-proxy-agent');\nasync function fetchWithRetry(url, options = {}) {\n  const maxRetries = options.maxRetries || 3;\n  const baseDelay = options.baseDelay || 1000;\n  for (let attempt = 1; attempt &lt;= maxRetries; attempt++) {\n    try {\n      const agent = new HttpsProxyAgent(\n        'http:\u002F\u002FUSERNAME:PASSWORD@gate.proxyhat.com:8080'\n      );\n      const response = await axios.get(url, {\n        httpsAgent: agent,\n        timeout: options.timeout || 30000,\n      });\n      if (response.status === 200) return response;\n      throw new Error(`HTTP ${response.status}`);\n    } catch (error) {\n      console.warn(`Attempt ${attempt}\u002F${maxRetries} failed: ${error.message}`);\n      if (attempt === maxRetries) throw error;\n      \u002F\u002F Exponential backoff: 1s, 2s, 4s...\n      const delay = baseDelay * Math.pow(2, attempt - 1);\n      await new Promise(r =&gt; setTimeout(r, delay));\n    }\n  }\n}\n\u002F\u002F Usage\nconst response = await fetchWithRetry('https:\u002F\u002Fexample.com', {\n  maxRetries: 3,\n  timeout: 20000,\n});\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Concurrent Scraping with Concurrency Control\u003C\u002Fh2>\n\u003Cp>Sending all requests at once with \u003Ccode>Promise.all\u003C\u002Fcode> can overwhelm both your machine and the target server. Use a concurrency limiter to control the number of parallel connections:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>async function asyncPool(concurrency, items, iteratorFn) {\n  const results = [];\n  const executing = new Set();\n  for (const [index, item] of items.entries()) {\n    const promise = Promise.resolve().then(() =&gt; iteratorFn(item, index));\n    results.push(promise);\n    executing.add(promise);\n    const cleanup = () =&gt; executing.delete(promise);\n    promise.then(cleanup, cleanup);\n    if (executing.size &gt;= concurrency) {\n      await Promise.race(executing);\n    }\n  }\n  return Promise.all(results);\n}\n\u002F\u002F Scrape 100 URLs, 10 at a time\nconst urls = Array.from({ length: 100 }, (_, i) =&gt;\n  `https:\u002F\u002Fexample.com\u002Fpage\u002F${i + 1}`\n);\nconst results = await asyncPool(10, urls, async (url) =&gt; {\n  return fetchWithRetry(url, { maxRetries: 2, timeout: 15000 });\n});\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>For large-scale \u003Ca href=\"\u002Fuse-cases\u002Fweb-scraping\">web scraping projects\u003C\u002Fa>, keeping concurrency between 5 and 20 offers a good balance between speed and reliability. Read our guide on the \u003Ca href=\"\u002Fblog\u002Fbest-proxies-for-web-scraping-2026\">best proxies for web scraping in 2026\u003C\u002Fa> for more architecture advice.\u003C\u002Fp>\n\u003Ch2>Production Tips\u003C\u002Fh2>\n\u003Ch3>Connection Management\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Reuse Axios instances and proxy agents instead of creating new ones per request. This avoids socket exhaustion.\u003C\u002Fli>\n\u003Cli>Set \u003Ccode>keepAlive: true\u003C\u002Fcode> on your HTTP agent for persistent connections.\u003C\u002Fli>\n\u003Cli>Close Puppeteer\u002FPlaywright browsers promptly after use to free memory.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Memory and Timeouts\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>For Puppeteer, use \u003Ccode>page.setRequestInterception(true)\u003C\u002Fcode> to block images, CSS, and fonts when you only need HTML content. This reduces bandwidth and memory usage significantly.\u003C\u002Fli>\n\u003Cli>Always set explicit timeouts on every request. A missing timeout is the number one cause of hanging scrapers.\u003C\u002Fli>\n\u003Cli>Monitor Node.js memory with \u003Ccode>process.memoryUsage()\u003C\u002Fcode> in long-running scrapers.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Request Interception for Faster Scraping\u003C\u002Fh3>\n\u003Cpre>\u003Ccode>const page = await browser.newPage();\nawait page.setRequestInterception(true);\npage.on('request', (req) =&gt; {\n  const blocked = ['image', 'stylesheet', 'font', 'media'];\n  if (blocked.includes(req.resourceType())) {\n    req.abort();\n  } else {\n    req.continue();\n  }\n});\nawait page.goto('https:\u002F\u002Fexample.com');\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Environment Variables\u003C\u002Fh3>\n\u003Cp>Never hardcode credentials. Use a \u003Ccode>.env\u003C\u002Fcode> file and load it with \u003Ccode>dotenv\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>require('dotenv').config();\nconst proxyUrl = `http:\u002F\u002F${process.env.PROXY_USER}:${process.env.PROXY_PASS}@gate.proxyhat.com:8080`;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Ready to start? Check \u003Ca href=\"\u002Fpricing\">our pricing plans\u003C\u002Fa> to find the right amount of residential proxy bandwidth for your project.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Ch3>Key Takeaways\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>The \u003Cstrong>ProxyHat Node SDK\u003C\u002Fstrong> is the fastest way to add proxy support. Install with \u003Ccode>npm install proxyhat\u003C\u002Fcode> and start fetching in three lines of code.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Axios\u003C\u002Fstrong> works with proxies via \u003Ccode>https-proxy-agent\u003C\u002Fcode>, using a raw proxy URL or the one the SDK builds. Create a reusable Axios instance for efficiency.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Puppeteer\u003C\u002Fstrong> accepts proxies as a launch argument. Call \u003Ccode>page.authenticate()\u003C\u002Fcode> to pass credentials.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Playwright\u003C\u002Fstrong> has native proxy support in its launch and context options, including per-context proxies for multi-region scraping.\u003C\u002Fli>\n\u003Cli>Use \u003Cstrong>sticky sessions\u003C\u002Fstrong> for multi-step workflows and rotating IPs for large-scale data collection.\u003C\u002Fli>\n\u003Cli>Always implement retry logic with exponential backoff and concurrency control in production scrapers.\u003C\u002Fli>\n\u003Cli>Block unnecessary resources in headless browsers to reduce bandwidth and improve speed.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fblockquote>","Using Proxies in Node.js: Axios, Puppeteer & SDK","Complete guide to using proxies in Node.js with Axios, Puppeteer, Playwright, and the ProxyHat SDK. Code examples for rotation, retries, and concurrency.","\u002Fblog\u002Fusing-proxies-in-nodejs",null,"Using Proxies in Node.js: Axios, Puppeteer & SDK | ProxyHat","Complete guide to using proxies in Node.js with Axios, Puppeteer, Playwright, and the ProxyHat SDK.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fusing-proxies-in-nodejs-og.webp",[19,22,25,28,31],{"question":20,"answer":21},"How do I use a proxy with Axios in Node.js?","Install the https-proxy-agent package and pass a new HttpsProxyAgent instance as the httpsAgent option in your Axios request config. You can also create a pre-configured Axios instance with the proxy agent as a default to use across all requests.",{"question":23,"answer":24},"Can I use residential proxies with Puppeteer?","Yes. Launch Puppeteer with the --proxy-server flag pointing to your proxy gateway, then call page.authenticate() with your proxy username and password. Each new page in that browser session will route through the proxy.",{"question":26,"answer":27},"What is the difference between rotating and sticky proxy sessions?","Rotating proxies assign a new IP address for every request, which is ideal for large-scale scraping. Sticky sessions keep the same IP for a set duration (up to 30 minutes), which is necessary for multi-step workflows like logging in or navigating paginated results.",{"question":29,"answer":30},"How do I handle proxy errors and timeouts in Node.js?","Implement a retry wrapper with exponential backoff. Create a new proxy agent for each retry attempt so you get a fresh IP. Always set explicit timeout values on every request to prevent your scraper from hanging on unresponsive connections.",{"question":32,"answer":33},"How many concurrent proxy requests can I send from Node.js?","The optimal concurrency depends on your proxy plan and the target website. Generally, 5 to 20 concurrent connections provide a good balance between throughput and reliability. Use a concurrency limiter like the asyncPool pattern instead of launching all requests with Promise.all at once.",[35,36,37,38,39],"Use proxies in Node.js to avoid rate limits and IP bans when scraping or automating tasks at scale.","Configure proxies in Axios, Puppeteer, or Playwright using the ProxyHat SDK or standard proxy URLs.","Choose rotating sessions for large-scale scraping and sticky sessions for multi-step workflows.","Implement retry strategies with exponential backoff and concurrency limits to handle network errors.","Optimize browser scraping by blocking images and CSS to significantly reduce bandwidth and memory.",false,"2026-01-06T09:05:38+00:00","2026-07-19T03:13:07+00:00","2026-11-17T10:40:54+00:00","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fusing-proxies-in-nodejs-master.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fusing-proxies-in-nodejs-card.webp",12,{"name":48,"slug":49,"bio":50,"avatar_url":14,"website_url":14,"social_links":14},"ProxyHat Team","proxyhat-team","The ProxyHat editorial team covers proxies, web scraping, and data extraction.",[52],{"id":6,"slug":53,"name":54,"description":14,"meta_title":55,"meta_description":56,"parent_id":14},"developer-guides","Developer Guides","Developer Guides | ProxyHat Blog","Code tutorials and SDK guides for integrating proxies into your applications.",[58,62,66],{"id":59,"slug":60,"name":61},1,"web-scraping","Web Scraping",{"id":63,"slug":64,"name":65},10,"nodejs","Node.js",{"id":46,"slug":67,"name":68},"sdk","SDK",{"tr":70,"en":13,"de":71,"pt":72,"es":73,"ru":74,"ja":75,"pl":76,"ko":77,"it":78,"zh":79,"fr":80,"x-default":13},"\u002Ftr\u002Fblog\u002Fnodejs-ile-proxy-kullanimi","\u002Fde\u002Fblog\u002Fproxies-in-nodejs-verwenden","\u002Fpt\u002Fblog\u002Fusando-proxies-em-nodejs","\u002Fes\u002Fblog\u002Fusar-proxies-en-nodejs","\u002Fru\u002Fblog\u002Fispolzovanie-proksi-v-nodejs","\u002Fja\u002Fblog\u002Fnodejs-de-prokishi-wo-tsukau","\u002Fpl\u002Fblog\u002Fkorzystanie-z-proxies-w-nodejs-axios-puppeteer-sdk","\u002Fko\u002Fblog\u002Fnodejs-proxy-sayongbeop","\u002Fit\u002Fblog\u002Futilizzo-dei-proxy-in-nodejs-axios-puppeteer-sdk","\u002Fcn\u002Fblog\u002Fnodejs-shiyong-daili","\u002Ffr\u002Fblog\u002Futiliser-des-proxies-en-nodejs",{"tr":70,"en":13,"de":71,"pt":72,"es":73,"ru":74,"ja":75,"pl":76,"ko":77,"it":78,"zh":79,"fr":80},72,[84,101,119,138],{"id":85,"slug":86,"title":87,"excerpt":88,"featured_image_url":89,"featured_image_alt":14,"card_image_url":90,"og_image_url":91,"published_at":92,"updated_at":42,"content_updated_at":93,"reading_time_minutes":46,"is_featured":40,"indexable":40,"views":94,"author":95,"categories":96,"tags":98},50,"reliable-scraping-architecture","Designing a Reliable Scraping Architecture","Design an end-to-end scraping system: scheduler, URL queue, crawler pool, proxy layer, parser, storage, and monitoring. Production-ready Python code with architecture diagrams.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Freliable-scraping-architecture-master.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Freliable-scraping-architecture-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Freliable-scraping-architecture-og.webp","2026-02-24T06:55:16+00:00","2026-10-03T08:21:20+00:00",68,{"name":48,"slug":49,"bio":50,"avatar_url":14,"website_url":14,"social_links":14},[97],{"id":6,"slug":53,"name":54,"description":14,"meta_title":55,"meta_description":56,"parent_id":14},[99,100],{"id":46,"slug":67,"name":68},{"id":59,"slug":60,"name":61},{"id":102,"slug":103,"title":104,"excerpt":105,"featured_image_url":106,"featured_image_alt":14,"card_image_url":107,"og_image_url":108,"published_at":109,"updated_at":42,"content_updated_at":110,"reading_time_minutes":111,"is_featured":40,"indexable":40,"views":112,"author":113,"categories":114,"tags":116},41,"monitoring-proxy-performance","Monitoring Proxy Performance: Latency, Success Rate, and Alerts","Learn how to instrument, monitor, and alert on proxy performance — track latency percentiles, success rates, error patterns, and bandwidth. Code examples in Python, Node.js, and Go.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fmonitoring-proxy-performance-master.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fmonitoring-proxy-performance-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fmonitoring-proxy-performance-og.webp","2026-02-15T00:39:23+00:00","2026-10-03T08:21:37+00:00",11,74,{"name":48,"slug":49,"bio":50,"avatar_url":14,"website_url":14,"social_links":14},[115],{"id":6,"slug":53,"name":54,"description":14,"meta_title":55,"meta_description":56,"parent_id":14},[117,118],{"id":46,"slug":67,"name":68},{"id":59,"slug":60,"name":61},{"id":120,"slug":121,"title":122,"excerpt":123,"featured_image_url":124,"featured_image_alt":14,"card_image_url":125,"og_image_url":126,"published_at":127,"updated_at":42,"content_updated_at":128,"reading_time_minutes":63,"is_featured":40,"indexable":40,"views":129,"author":130,"categories":131,"tags":135},36,"scale-scraping-infrastructure","How to Scale Scraping Infrastructure","Architecture patterns for scaling web scraping: queue-based systems, pipeline design, horizontal scaling with containers, and proxy management at scale. Code in Python, Node.js, and Go.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscale-scraping-infrastructure-master.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscale-scraping-infrastructure-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscale-scraping-infrastructure-og.webp","2026-02-09T14:42:34+00:00","2026-02-25T23:52:12+00:00",49,{"name":48,"slug":49,"bio":50,"avatar_url":14,"website_url":14,"social_links":14},[132],{"id":59,"slug":60,"name":61,"description":14,"meta_title":133,"meta_description":134,"parent_id":14},"Web Scraping Guides & Tips | ProxyHat Blog","Learn web scraping techniques, proxy strategies, and data extraction best practices.",[136,137],{"id":59,"slug":60,"name":61},{"id":46,"slug":67,"name":68},{"id":139,"slug":140,"title":141,"excerpt":142,"featured_image_url":143,"featured_image_alt":14,"card_image_url":144,"og_image_url":145,"published_at":146,"updated_at":42,"content_updated_at":147,"reading_time_minutes":46,"is_featured":40,"indexable":40,"views":148,"author":149,"categories":150,"tags":152},35,"scaling-proxy-requests-concurrency","Scaling Proxy Requests with Concurrency Control","Master concurrency patterns for proxy-based scraping: asyncio semaphores, Promise pools, Go worker pools, rate limiters, and backpressure. Production code in Python, Node.js, and Go.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscaling-proxy-requests-concurrency-master.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscaling-proxy-requests-concurrency-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog\u002Fscaling-proxy-requests-concurrency-og.webp","2026-02-08T11:16:13+00:00","2026-10-03T08:21:21+00:00",357,{"name":48,"slug":49,"bio":50,"avatar_url":14,"website_url":14,"social_links":14},[151],{"id":6,"slug":53,"name":54,"description":14,"meta_title":55,"meta_description":56,"parent_id":14},[153,154],{"id":46,"slug":67,"name":68},{"id":59,"slug":60,"name":61},[]]