Web scraping API

Send a URL, get the page. VirginProxy fetches it with complete, current browser headers, tries again after timeouts and errors, and tells you exactly what the answer cost.

Start with 50 free creditsOpen playground

You send

POST /v1/requests
{
  "url": "https://shop.example/category/shoes?page=2",
  "session": "shop-crawl-1",
  "retry": {
    "times": 2
  }
}
Endpoint
POST /v1/requests
Cost
1 credit per answer up to 1 MB
Plans
All plans, Free included
Failed requests
Not charged
Documentation
Step-by-step guide

Scrapers rarely fail because of the parsing. They fail on everything around it: timeouts, unstable connections, pages that need JavaScript – and the servers and network you have to keep running for it.

How VirginProxy helps

  • One endpoint for every request: GET, POST, headers, cookies and body exactly as you send them.
  • A new IP address on request, or the same one for a whole session of up to ten minutes.
  • Browser profiles for Chrome, Safari, Firefox or Edge, on desktop or phone, with complete, current headers.
  • Retries after timeouts and errors are built in, and you only pay when the target actually answered.

How it works, step by step

  1. Get a key

    Sign up, get 50 free credits to try it and your first API key.

  2. Send a URL

    POST /v1/requests with the URL – method, headers, cookies and body as you need them.

  3. Read the answer and its receipt

    The target’s status, headers and body come back with exit IP, size, duration and the exact cost.

  4. Add options when a site needs them

    Sessions, retries, a real browser, extraction or Markdown – one parameter each, no extra setup.

Example request

A category page, kept on one IP address for the whole crawl and tried again up to twice if it fails.

curl https://api.virginproxy.com/v1/requests \
  -H "Authorization: Bearer $VP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://shop.example/category/shoes?page=2",
    "session": "shop-crawl-1",
    "retry": {
      "times": 2
    }
  }'
import os, requests

r = requests.post(
    "https://api.virginproxy.com/v1/requests",
    headers={"Authorization": "Bearer " + os.environ["VP_KEY"]},
    json={
        "url": "https://shop.example/category/shoes?page=2",
        "session": "shop-crawl-1",
        "retry": {
            "times": 2
        }
    },
    timeout=150,
)
data = r.json()
print(data["status"], data["exit"]["ip"], data["cost"]["credits"])
const res = await fetch("https://api.virginproxy.com/v1/requests", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VP_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://shop.example/category/shoes?page=2",
    "session": "shop-crawl-1",
    "retry": {
      "times": 2
    }
  }),
});
const data = await res.json();
console.log(data.status, data.exit.ip, data.cost.credits);
$ch = curl_init("https://api.virginproxy.com/v1/requests");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("VP_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "url" => "https://shop.example/category/shoes?page=2",
        "session" => "shop-crawl-1",
        "retry" => [
            "times" => 2,
        ],
    ]),
    CURLOPT_TIMEOUT => 150,
]);
$data = json_decode(curl_exec($ch), true);
echo $data["status"], " ", $data["exit"]["ip"], " ", $data["cost"]["credits"];
body := strings.NewReader(`{
  "url": "https://shop.example/category/shoes?page=2",
  "session": "shop-crawl-1",
  "retry": {
    "times": 2
  }
}`)
req, _ := http.NewRequest("POST", "https://api.virginproxy.com/v1/requests", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("VP_KEY"))
req.Header.Set("Content-Type", "application/json")

res, err := http.DefaultClient.Do(req)
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
var data map[string]any
json.NewDecoder(res.Body).Decode(&data)
fmt.Println(data["status"], data["exit"].(map[string]any)["ip"], data["cost"].(map[string]any)["credits"])

Documentation for this feature · Command line (vp) · n8n, LangChain and LlamaIndex · API reference

What comes back

Every answer carries its own receipt:

{
  "status": 200,
  "final_url": "https://shop.example/product/42",
  "exit": { "ip": "203.0.113.42", "country": "DE" },
  "bytes": { "up": 1984, "down": 41210 },
  "duration_ms": 583,
  "cost": { "credits": 1 }
}

What it costs

One answer of up to 1 MB costs 1 credit, each further megabyte 1 more. 50,000 pages of about 300 KB in 30 days are 50,000 credits: Starter (€19, 25,000 credits) plus 25,000 extra credits at €1.20 per 1,000 – €49 in total, less than Growth. A new IP on request costs 5 credits; timeouts and unreachable targets cost nothing.

Pricing and cost examples

Good to know

  • Browser headers are sent for you; add only what a site expects, such as a Referer or its consent cookie.
  • Use a session when a site needs cookies from an earlier page.
  • Set max_credits on requests that could get very large.
  • Look at the error code of a failed request: it says whether a retry makes sense.

Questions

What does a request cost?

One credit covers an answer of up to 1 MB; each further megabyte is one more credit. A fresh IP adds 5 credits, a real browser 9. Timeouts, unreachable targets and our own errors cost nothing.

Do I need to manage proxies myself?

No. You send the request to our API, we choose the exit address, keep sessions together and change the address when you ask for it. Every answer tells you which address was used.

Which HTTP methods can I use?

GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS, with your own headers and a body of up to 5 MB.

How do I know what a request cost?

Every answer has cost.credits, and the dashboard lists every request with its cost for 90 days.

Do I need an SDK?

No. It is plain HTTPS with JSON; any language that can send a POST request works.

Can I use it from the command line or my AI tools?

Yes. The vp command line tool fetches, crawls and searches from your terminal; there is a community node for n8n and loaders for LangChain and LlamaIndex. The docs page on integrations shows how to install them.

Try it with 50 free credits

Pick up where you left off

No card needed. Your first request takes two minutes.

Your credits, keys and recent requests are waiting in the dashboard.

Start with 50 free creditsGo to dashboard