curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"includeImages": true,
"providers": [
"<string>"
],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-search"
payload = {
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"includeImages": True,
"providers": ["<string>"],
"rails": [],
"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({
query: '<string>',
maxResults: 10,
maxProviders: 7,
recencyDays: 183,
country: '<string>',
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
includeImages: true,
providers: ['<string>'],
rails: [],
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-search', 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-search",
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([
'query' => '<string>',
'maxResults' => 10,
'maxProviders' => 7,
'recencyDays' => 183,
'country' => '<string>',
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'includeImages' => true,
'providers' => [
'<string>'
],
'rails' => [
],
'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-search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\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-search")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\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-search")
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 \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{}Run multi-provider web search
Searches eligible providers in parallel, canonicalizes and deduplicates URLs, fuses rankings, and returns per-result source provenance. The charge is the sum of successful underlying calls.
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"includeImages": true,
"providers": [
"<string>"
],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-search"
payload = {
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"includeImages": True,
"providers": ["<string>"],
"rails": [],
"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({
query: '<string>',
maxResults: 10,
maxProviders: 7,
recencyDays: 183,
country: '<string>',
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
includeImages: true,
providers: ['<string>'],
rails: [],
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-search', 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-search",
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([
'query' => '<string>',
'maxResults' => 10,
'maxProviders' => 7,
'recencyDays' => 183,
'country' => '<string>',
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'includeImages' => true,
'providers' => [
'<string>'
],
'rails' => [
],
'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-search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\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-search")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\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-search")
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 \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{}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
1 - 400fast, balanced, comprehensive 1 <= x <= 201 <= x <= 13Legacy v1 selector. Accepted for compatibility; prefer mode.
balanced, cost, quality, speed general, news 1 <= x <= 365^[A-Za-z]{2}$202013Legacy v1 payment-path allowlist. Accepted but ignored because Locus chooses each provider payment path internally.
api-key, mpp, x402 Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
^\d+(?:\.\d{1,6})?$Response
Normalized result and billing receipt
The response is of type object.