Plans

⚠️

Important distinction between Subscription and Plan

Subscription stays with the user even after a user switches to a new Plan. Whereas, a new Plan object is created each time a customer re-customizes their Plan.

Plan object holds information about the customization options for the plan
e.g. plan type, monthly price, proxy locations.

See the Subscription API.

Plan Object

AttributesTypeDescription
idint

Unique identifier of the plan instance.

bandwidth_limitfloat

Bandwidth limit in GBs. 0 means unlimited bandwidth.

monthly_pricefloat

Price in USD for the monthly term.

yearly_pricefloat

Price in USD for the yearly term.

proxy_typestring

Category of proxies. Options are: free, shared, semidedicated and dedicated.

proxy_subtypestring

Sub category of the proxies. Options are default, non-premium, premium, isp and residential. Not all proxy types have the same sub types.

proxy_countint

Number of proxies in the plan.

proxy_countriesobject

Number of proxies from each country code. ZZ means country is randomly allocated.

required_site_checkslist

List of site checks the proxy list has to work with. E.g. google_search means that the proxies will work with Google search.

on_demand_refreshes_totalint

Number of on-demand refreshes purchased as part of this plan.

on_demand_refreshes_usedint

Number of on-demand refreshes used since subscription.start_date. The on-demand refreshes reset at the end of subscription.end_date.

on_demand_refreshes_availableint

Number of on-demand refreshes available for this plan.

automatic_refresh_frequencyint

Auto-refresh your proxy list every automatic_refresh_frequency seconds. 0 value means no automatic refreshes.

automatic_refresh_last_atdatetime

Last time proxy list was auto-refreshed. It will come as null in the case of the list plans endpoint.

automatic_refresh_next_atdatetime

Next time proxy list will be auto-refreshed. It will come as null in the case of the list plans endpoint.

proxy_replacements_totalint

Individual proxy replacements purchased as part of this plan.

proxy_replacements_usedint

Individual proxy replacements used since subscription.start_date. The proxy replacements reset at the end of subscription.end_date.

proxy_replacements_availableint

Individual proxy replacements available for this plan.

subusers_totalint

Number of subusers allowed in this plan.

is_unlimited_ip_authorizationsboolean

Indicates whether this plan has unlimited IP Authorizations.

is_high_concurrencyboolean

Indicates whether this plan has unlimited IP Authorizations.

is_high_priority_networkboolean

Indicates whether this plan has high priority network.

created_atstring

The timestamp when this instance was created.

updated_atstring

The timestamp when this instance was last updated.

In JSON format

{
  "id": 2,
  "bandwidth_limit": 50.0,
  "monthly_price": 9.99,
  "yearly_price": 49.99,
  "proxy_type": "shared",
  "proxy_subtype": "default",
  "proxy_count": 1000,
  "proxy_countries": {"ZZ": 1000},
  "required_site_checks": ["google_search"],
  "on_demand_refreshes_total": 0,
  "on_demand_refreshes_used": 0,
  "on_demand_refreshes_available": 0,
  "automatic_refresh_frequency": 0,
  "automatic_refresh_last_at": null,
  "automatic_refresh_next_at": null,
  "proxy_replacements_total": 10,
  "proxy_replacements_used": 0,
  "proxy_replacements_available": 10,
  "subusers_total": 3,
  "subusers_used": 0,
  "subusers_available": 3,
  "is_unlimited_ip_authorizations": true,
  "is_high_concurrency": true,
  "is_high_priority_network": false,
  "created_at": "2022-06-14T11:58:10.246406-07:00",
  "updated_at": "2022-06-14T11:58:10.246406-07:00"
}

List plans

This endpoint retrieves all plans created by the user (even the non-active ones) in paginated format with filtering & ordering enabled.

GET https://proxy.webshare.io/api/v2/subscription/plan/

Request & Response

list_plans.py
import requests
 
response = requests.get(
  "https://proxy.webshare.io/api/v2/subscription/plan/",
  headers={"Authorization": "Token "}
)
 
response.json()

The commands above return JSON structured like this:

response.json
{
   "count":1,
   "next":null,
   "previous":null,
   "results":[
     {
       "id": 2,
       "bandwidth_limit": 50.0,
       "monthly_price": 9.99,
       "yearly_price": 49.99,
       "proxy_type": "shared",
       "proxy_subtype": "default",
       "proxy_count": 1000,
       "proxy_countries": {"ZZ": 1000},
       "required_site_checks": ["google_search"],
       "on_demand_refreshes_total": 0,
       "on_demand_refreshes_used": 0,
       "on_demand_refreshes_available": 0,
       "automatic_refresh_frequency": 0,
       "automatic_refresh_last_at": null,
       "automatic_refresh_next_at": null,
       "proxy_replacements_total": 10,
       "proxy_replacements_used": 0,
       "proxy_replacements_available": 10,
       "subusers_total": 3,
       "subusers_used": 0,
       "subusers_available": 3,
       "is_unlimited_ip_authorizations": true,
       "is_high_concurrency": true,
       "is_high_priority_network": false,
       "created_at": "2022-06-14T11:58:10.246406-07:00",
       "updated_at": "2022-06-14T11:58:10.246406-07:00"
     }
   ]
}

Update plan

This endpoint lets you update an existing plan. You can only update the automatic_refresh_next_at field of the Plan object.

Request & Response

PATCH https://proxy.webshare.io/api/v2/subscription/plan/<ID>/
update_plan.py
import requests
 
response = requests.patch(
    "https://proxy.webshare.io/api/v2/subscription/plan/2/",
    json={
        "automatic_refresh_next_at":"2022-06-14T11:58:10.246406-07:00"
    },
    headers={"Authorization": "Token "}
)
 
response.json()

The commands above return JSON structured like this:

response.json
{
  "id": 2,
  "bandwidth_limit": 50.0,
  "monthly_price": 9.99,
  "yearly_price": 49.99,
  "proxy_type": "shared",
  "proxy_subtype": "default",
  "proxy_count": 1000,
  "proxy_countries": {"ZZ": 1000},
  "required_site_checks": ["google_search"],
  "on_demand_refreshes_total": 0,
  "on_demand_refreshes_used": 0,
  "on_demand_refreshes_available": 0,
  "automatic_refresh_frequency": 0,
  "automatic_refresh_last_at": null,
  "automatic_refresh_next_at": "2022-06-14T11:58:10.246406-07:00",
  "proxy_replacements_total": 10,
  "proxy_replacements_used": 0,
  "proxy_replacements_available": 10,
  "subusers_total": 3,
  "subusers_used": 0,
  "subusers_available": 3,
  "is_unlimited_ip_authorizations": true,
  "is_high_concurrency": true,
  "is_high_priority_network": false,
  "created_at": "2022-06-14T11:58:10.246406-07:00",
  "updated_at": "2022-06-14T11:58:10.246406-07:00"
}

Retrieve plan

This endpoint returns the plan. You can find the active plan id from the subscription object.

Parameters

ParameterTypeDescription
IDint

The ID of the plan to retrieve

Request & Response

GET https://proxy.webshare.io/api/v2/subscription/plan/<ID>/
retrieve_plan.py
import requests
 
response = requests.get(
    "https://proxy.webshare.io/api/v2/subscription/plan/2/",
    headers={"Authorization": "Token "}
)
 
response.json()

The commands above return JSON structured like this:

response.json
{
  "id": 2,
  "bandwidth_limit": 50.0,
  "monthly_price": 9.99,
  "yearly_price": 49.99,
  "proxy_type": "shared",
  "proxy_subtype": "default",
  "proxy_count": 1000,
  "proxy_countries": {"ZZ": 1000},
  "required_site_checks": ["google_search"],
  "on_demand_refreshes_total": 0,
  "on_demand_refreshes_used": 0,
  "on_demand_refreshes_available": 0,
  "automatic_refresh_frequency": 0,
  "automatic_refresh_last_at": null,
  "automatic_refresh_next_at": null,
  "proxy_replacements_total": 10,
  "proxy_replacements_used": 0,
  "proxy_replacements_available": 10,
  "subusers_total": 3,
  "subusers_used": 0,
  "subusers_available": 3,
  "is_unlimited_ip_authorizations": true,
  "is_high_concurrency": true,
  "is_high_priority_network": false,
  "created_at": "2022-06-14T11:58:10.246406-07:00",
  "updated_at": "2022-06-14T11:58:10.246406-07:00"
}