Website crawler
Name a start page, and the crawl follows the links of the same site until your depth or page limit is reached. It runs in the background; you collect the pages as they are done – or have them sent to you.
You send
POST /v1/crawl
{
"url": "https://blog.example/",
"max_depth": 2,
"max_pages": 100,
"include_paths": [
"/posts/**"
],
"request": {
"format": "markdown",
"main_content": true
},
"webhook": {
"url": "https://your-server.example/hooks/virginproxy"
}
}- Endpoint
POST /v1/crawl- Cost
- Each page like a single request
- Plans
- All plans, Free included
- Failed requests
- Not charged
- Documentation
- Step-by-step guide
A crawler of your own needs a queue, a record of what was already visited, rules for which links to follow and a way to carry on after a crash – plus everything a single request needs, for every page.
How VirginProxy helps
POST /v1/crawlstarts at one page and follows links level by level, up tomax_depthandmax_pages.include_pathsandexclude_pathsdecide which paths are followed; links to images, PDFs and other files are skipped.- Every page with the options of a single request: Markdown, main content only, extracted fields, rendering.
- Runs as a job: progress, a live result stream, signed webhooks, delivery to your own storage and results kept for 24 hours.
How it works, step by step
Name the start page
POST /v1/crawlwith url, how deep to go (max_depth, 0 to 10) and how many pages at most (max_pages).Set the rules
include_pathsandexclude_pathstake patterns with * and **;ignore_querytreats /list?page=2 and /list?page=3 as the same page.Say what you need from each page
request takes the options of a single request – format,
main_content, extract, render – and applies them to every page.Collect the pages
Page by page from the job’s results, or by webhook as they are done. Each item has its url, its depth and the full answer.
Example request
A blog, two links deep and only its posts, every page as clean Markdown; the results are sent to your server.
curl https://api.virginproxy.com/v1/crawl \
-H "Authorization: Bearer $VP_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://blog.example/",
"max_depth": 2,
"max_pages": 100,
"include_paths": [
"/posts/**"
],
"request": {
"format": "markdown",
"main_content": true
},
"webhook": {
"url": "https://your-server.example/hooks/virginproxy"
}
}'
import os, requests
r = requests.post(
"https://api.virginproxy.com/v1/crawl",
headers={"Authorization": "Bearer " + os.environ["VP_KEY"]},
json={
"url": "https://blog.example/",
"max_depth": 2,
"max_pages": 100,
"include_paths": [
"/posts/**"
],
"request": {
"format": "markdown",
"main_content": True
},
"webhook": {
"url": "https://your-server.example/hooks/virginproxy"
}
},
timeout=150,
)
data = r.json()
print(data["id"], data["status"])
const res = await fetch("https://api.virginproxy.com/v1/crawl", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VP_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://blog.example/",
"max_depth": 2,
"max_pages": 100,
"include_paths": [
"/posts/**"
],
"request": {
"format": "markdown",
"main_content": true
},
"webhook": {
"url": "https://your-server.example/hooks/virginproxy"
}
}),
});
const data = await res.json();
console.log(data.id, data.status);
$ch = curl_init("https://api.virginproxy.com/v1/crawl");
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://blog.example/",
"max_depth" => 2,
"max_pages" => 100,
"include_paths" => ["/posts/**"],
"request" => [
"format" => "markdown",
"main_content" => true,
],
"webhook" => [
"url" => "https://your-server.example/hooks/virginproxy",
],
]),
CURLOPT_TIMEOUT => 150,
]);
$data = json_decode(curl_exec($ch), true);
echo $data["id"], " ", $data["status"];
body := strings.NewReader(`{
"url": "https://blog.example/",
"max_depth": 2,
"max_pages": 100,
"include_paths": [
"/posts/**"
],
"request": {
"format": "markdown",
"main_content": true
},
"webhook": {
"url": "https://your-server.example/hooks/virginproxy"
}
}`)
req, _ := http.NewRequest("POST", "https://api.virginproxy.com/v1/crawl", 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["id"], data["status"])
Documentation for this feature · Delivery to your storage · API reference
What comes back
One page from the results of a crawl:
{
"index": 1,
"status": "succeeded",
"url": "https://blog.example/posts/42",
"depth": 1,
"credits": 1,
"response": {
"status": 200,
"format": "markdown",
"body": "# …"
}
}What it costs
The crawl itself is free. Each page costs what the same single request costs – 1 credit per started MB, 10 or more with rendering – and pages that do not answer cost nothing. A crawl of 100 plain pages is about 100 credits. POST /v1/estimate shows the worst case beforehand, and max_credits in request caps each page.
Good to know
- The start page is always read;
max_depth0 reads only the start page. - Links are in the result only if you ask for them with
"parse": ["links"] in request. - Respect the site’s terms and keep the load reasonable:
max_pagesand your plan’s parallel requests set the pace. - Send an Idempotency-Key header: a repeated call returns the same crawl instead of starting a second one.
- In a monitor,
only_changed: true delivers only the pages that changed since the last run – the others are neither delivered nor counted.
Questions
What does a crawl cost?
Each page is one ordinary request with the options you chose: 1 credit per started MB, 10 or more with rendering. 100 plain pages cost about 100 credits; pages that do not answer cost nothing.
How many pages can one crawl read?
Up to your plan’s crawl limit, start page included: 10 on Free, 100 on Starter, 500 on Growth and 1,000 on Scale.
Does the crawl follow links to other domains?
No. It stays on the start host; with include_subdomains it also follows its subdomains.
Can I cancel a crawl?
Yes, like any job, with DELETE. Pages that have not been read are not charged; finished results stay available.
How do I know when it is done?
Ask for the job’s status, or set a webhook: it reports the results and the end of the crawl.
Can I get the pages while the crawl is still running?
Yes. GET /v1/jobs/{id}/stream sends every finished page as one NDJSON line while the crawl runs, and delivery writes all pages into your own S3-compatible storage when it ends.
Other features
- Web scraping API
- JavaScript rendering
- URL to Markdown for LLMs
- Documents to Markdown
- Data extraction
- Web search API
- Screenshot API
- Website map and link discovery
- Batch jobs and webhooks
- Website monitoring
- MCP server for AI agents
Use cases
- Price and stock monitoring
- Travel and tickets
- Listings and classifieds
- Testing and verification
- Brand protection
Pricing and cost examplesSelf-hosting vs APIWeb scraping APIs comparedWhat is a web scraping API?Quick start
Use VirginProxy for lawful purposes and respect the terms and rights of the sites you visit.
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