Plans & line generation

Generate proxy lines

Turn a gateway plan you own into ready-to-use proxy lines, fully programmatic, using the same hardened generator the dashboard uses. Every product whose delivery is lines on products generates (residential, mobile, ISP rotating, IPv4 and IPv6 per GB); the product's generate block, and each plan's, says which targeting fields its network takes. Lines come back as host:port:username:password with the targeting baked into the username, so any client that accepts a proxy username and password uses them without extra settings. Chrome and other Chromium browsers never send a SOCKS5 username and password, so for them generate with protocol set to http, the default. Every field is optional; an empty body returns one rotating line with the plan's defaults. Generating lines is free and repeatable: traffic is only consumed when the lines are used. All generated lines draw from the SAME plan balance. Dedicated per-IP products don't generate; fetch them from GET /proxies instead.

post/api/v1/plans/{id}/generate

Request

  • Base URL: https://hproxy.com
  • URL: https://hproxy.com/api/v1/plans/{id}/generate
  • Auth: API key in header X-API-Key

Path parameters

idstring required

Request body

protocolstring

"http" (default) or "socks5".

countinteger

Lines to return, 1 to 5000, and at most the plan's own generate.maxCount (5,000 on Residential Premium, 1,000 on Residential Lite); a count past it answers 400 invalid_count naming the ceiling. Default 1. Sticky and rotating batches share this limit: on Residential Premium sticky lines take the sticky ports in turn and every line holds its own session, so the number of ports never limits a batch. Each plan's generate.sticky block carries the sticky port range (port, ports).

countrystring

Country targeting, e.g. "US" (letters only, 2 to 40 chars). This is where a residential order gets its country: the order carries none, so one plan serves every country and each call can target a different one.

statestring

State / region targeting, where the pool supports it.

citystring

City targeting, where the pool supports it.

ispstring

ISP targeting by name. Residential Plus plans only (400 on other products).

asninteger

ISP targeting by AS number, e.g. 7018 for AT&T or 7922 for Comcast, together with country. Residential Premium plans only; the list per country is GET /v1/products/residential-premium/geo/asns?country=US. 400 on other products.

osstring

"windows", "android", "ios" or "mac": the device the exit IP belongs to. Residential Premium only.

strictboolean

Default true: a target with no IP free fails the request. false: the gateway hands out another IP from the same country instead. Residential Premium only.

excludeAsninteger

Up to 20 AS numbers to avoid. Not together with excludeCountries. Residential Premium only.

udpboolean

true lets a socks5 line open UDP relays (SOCKS5 UDP ASSOCIATE). Refused on http. Residential Premium only.

stickyMinutesinteger

Turns sticky on. Omit for rotating IPs. On Residential Premium the number is the session length in minutes, 3 to 1440 (24 hours), and each sticky line holds its own session with no limit on how many; on Plus it is the session length up to 24 hours. On Residential Lite the pool takes no duration, so any value above 0 simply turns sticky on and the session lasts as long as you keep reusing the line. Each plan's generate block reports its own minStickyMinutes / maxStickyMinutes.

Response

Success

object required

Changes

No recorded changes to this operation across all 1 revision of this API.