Concepts
Smart Routing Quickstart
Smart routing automatically directs each request to the right IP pool based on the rules you define — no manual endpoint switching required.
Routing by country
Set a target country on your session and BuyProxy routes traffic through the closest matching residential pool automatically.
const { proxies } = await bp.plans.generate(plan.id, {
country: "DE",
stickyMinutes: 10, // optional, Premium Residential: 3 minutes to 24 hours
});Routing by ASN
For carrier-specific targeting, route by ASN to exit through IPs belonging to a particular network operator.
// Premium Residential only; ASN targeting needs a country
const { proxies } = await bp.plans.generate(plan.id, {
country: "DE",
asn: 3320,
});Custom rules
Combine country, ASN, device type, and tags into a single routing rule to build reusable endpoint configurations for your team.
Was this page helpful?