Concepts
Per-request targeting
Targeting is set per request when you generate proxy lines: by country on every plan, plus state, city and ASN on Premium Residential.
Routing by country
Pass a country when you generate proxy lines. Country targeting works on every pool.
res, err := client.Plans.Generate(ctx, plan.ID, &buyproxy.GenerateParams{
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.
# The Go SDK has no ASN field, so this calls the REST API directly.
curl -X POST https://www.buyproxy.org/v1/plans/PLAN_ID/generate \
-H "X-API-Key: $BUYPROXY_API_KEY" -H "Content-Type: application/json" \
-d '{"country":"DE","asn":3320}'Was this page helpful?