curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"urls": [
"<string>"
],
"objective": "<string>",
"maxCharactersPerUrl": 50000,
"maxAgeSeconds": 1296300,
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract"
payload = {
"urls": ["<string>"],
"objective": "<string>",
"maxCharactersPerUrl": 50000,
"maxAgeSeconds": 1296300,
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
urls: ['<string>'],
objective: '<string>',
maxCharactersPerUrl: 50000,
maxAgeSeconds: 1296300,
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
],
'objective' => '<string>',
'maxCharactersPerUrl' => 50000,
'maxAgeSeconds' => 1296300,
'maxCredits' => '<string>',
'externalUserId' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paywithlocus.com/api/wrapped/credits/router/web-extract")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/router/web-extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "locus.web_extract",
"capability": "web.extract",
"routerVersion": "2026-09-14.v28",
"partial": true,
"resources": [
{
"requestedUrl": "<string>",
"url": "<string>",
"status": "succeeded",
"retrievedAt": "2023-11-07T05:31:56Z",
"truncated": true,
"coverage": "full_content",
"source": {
"providerId": "<string>",
"providerName": "<string>"
},
"title": "<string>",
"content": "<string>",
"contentType": "text/markdown",
"publishedAt": "<string>",
"errorCode": "<string>"
}
],
"route": {
"strategy": "exact_resource_fallback",
"primary": "parallel/extract",
"fallback": "firecrawl/scrape",
"fallbackUsed": true
},
"billing": {
"chargedCredits": "<string>",
"successfulResources": 1,
"attemptedResources": 2,
"providerCalls": 2
}
}Run Web Extract
Reads the exact supplied URLs and returns their content and provider sources. Failed resources can use an extraction fallback.
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"urls": [
"<string>"
],
"objective": "<string>",
"maxCharactersPerUrl": 50000,
"maxAgeSeconds": 1296300,
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract"
payload = {
"urls": ["<string>"],
"objective": "<string>",
"maxCharactersPerUrl": 50000,
"maxAgeSeconds": 1296300,
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
urls: ['<string>'],
objective: '<string>',
maxCharactersPerUrl: 50000,
maxAgeSeconds: 1296300,
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
],
'objective' => '<string>',
'maxCharactersPerUrl' => 50000,
'maxAgeSeconds' => 1296300,
'maxCredits' => '<string>',
'externalUserId' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paywithlocus.com/api/wrapped/credits/router/web-extract"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paywithlocus.com/api/wrapped/credits/router/web-extract")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/router/web-extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"objective\": \"<string>\",\n \"maxCharactersPerUrl\": 50000,\n \"maxAgeSeconds\": 1296300,\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "locus.web_extract",
"capability": "web.extract",
"routerVersion": "2026-09-14.v28",
"partial": true,
"resources": [
{
"requestedUrl": "<string>",
"url": "<string>",
"status": "succeeded",
"retrievedAt": "2023-11-07T05:31:56Z",
"truncated": true,
"coverage": "full_content",
"source": {
"providerId": "<string>",
"providerName": "<string>"
},
"title": "<string>",
"content": "<string>",
"contentType": "text/markdown",
"publishedAt": "<string>",
"errorCode": "<string>"
}
],
"route": {
"strategy": "exact_resource_fallback",
"primary": "parallel/extract",
"fallback": "firecrawl/scrape",
"fallbackUsed": true
},
"billing": {
"chargedCredits": "<string>",
"successfulResources": 1,
"attemptedResources": 2,
"providerCalls": 2
}
}Authorizations
Tenant secret key (lcr_…). Server-side only.
Headers
Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.
16 - 128^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$Reuse the same value only when retrying the same logical request.
1 - 255Body
Exact public HTTP(S) resources to read. The router never substitutes another URL.
1 - 20 elements2048^[Hh][Tt][Tt][Pp][Ss]?://Optional focus within each supplied resource; it does not authorize discovery.
1 - 4001000 <= x <= 100000Maximum accepted cache age. Omit to use each extractor default.
600 <= x <= 2592000Aggregate hard charge ceiling in workspace credits. Decimal strings support up to six fractional digits; numeric values are rounded down to six digits.
^\s*(?=[0-9.]{1,100}\s*$)0*(?:(?:[1-9]\d{0,11})(?:\.\d{1,6})?|1000000000000(?:\.0{1,6})?|0\.(?=\d{0,5}[1-9])\d{1,6})\s*$Optional end-user billing attribution for a tenant secret key.
1\SOptional JSON ledger metadata such as a task or customer identifier.