Ca Contractor Lookup
by Scrapebench API in Search & web
Verify a California contractor licence by CSLB licence number or business name, returning licence status (normalised and as CSLB words it), classifications, issue and expiry dates, bond and workers' comp. Read live from the CSLB 'Check A License' registry; an unknown licence number is answered free.
https://api.scrapebench.dev/v1/ca-contractor-lookup- Price
- $0.04
- per call in USDC
- Uptime
- 84.6%
- last 30 days
- Response time
- 1.5 s
- 2.8 s slowest 5%
- Last check
- Passed
- 51 min ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.scrapebench.dev/v1/ca-contractor-lookup
Each call costs $0.04 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://api.scrapebench.dev/v1/ca-contractor-lookup
content-type: application/json
{
"license_number": "22726"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
city | string or null | No | Optional: keep only name matches whose city of record is this (case ignored). Default: null. |
license_number | string or null | No | CSLB licence number, digits only, e.g. '22726'. Send this or name. Default: null. |
name | string or null | No | Business name or its start, e.g. 'RANSOME' (case ignored). Matches names beginning with it. Send this or license_number. Default: null. |
Example response
The provider's example. We can't check it without paying.
Example response, 83 lines
{
"next_page": null,
"page": 0,
"page_size": 25,
"rows": [
{
"address": "1933 WILLIAMS STREET",
"bond_amount": "25,000",
"bond_number": "354811",
"business_name": "RANSOME COMPANY",
"business_type": "Corporation",
"city": "SAN LEANDRO",
"classifications": [
"A",
"C10"
],
"expiration_date": "10/31/2027",
"has_detail": true,
"issue_date": "07/01/1932",
"license_number": "22726",
"matched_by": "license_number",
"name_type": null,
"phone": "(510) 686-9900",
"source_url": "https://www.cslb.ca.gov/onlineservices/checklicenseII/LicenseDetail.aspx?LicNum=22726",
"state": "CA",
"status": "active",
"status_text": "This license is current and active.",
"surety_company": "HARCO NATIONAL INSURANCE COMPANY",
"workers_comp_company": "TRAVELERS PROPERTY CASUALTY COMPANY OF AMERICA",
"workers_comp_type": "Insurance",
"zip_code": "94577"
},
{
"address": null,
"bond_amount": null,
"bond_number": null,
"business_name": "RANSOME GAS INDUSTRIES INC",
"business_type": null,
"city": "SAN LEANDRO",
"classifications": [],
"expiration_date": null,
"has_detail": false,
"issue_date": null,
"license_number": "257884",
"matched_by": "business_name",
"name_type": "DBA",
"phone": null,
"source_url": "https://www.cslb.ca.gov/OnlineServices/checklicenseII/LicenseDetail.aspx?LicNum=257884",
"state": null,
"status": "expired",
"status_text": "Expired",
"surety_company": null,
"workers_comp_company": null,
"workers_comp_type": null,
"zip_code": null
},
{
"address": null,
"bond_amount": null,
"bond_number": null,
"business_name": "RANSOME PHIL",
"business_type": null,
"city": "ESCONDIDO",
"classifications": [],
"expiration_date": null,
"has_detail": false,
"issue_date": null,
"license_number": "82180",
"matched_by": "business_name",
"name_type": "DBA",
"phone": null,
"source_url": "https://www.cslb.ca.gov/OnlineServices/checklicenseII/LicenseDetail.aspx?LicNum=82180",
"state": null,
"status": "expired",
"status_text": "Expired",
"surety_company": null,
"workers_comp_company": null,
"workers_comp_type": null,
"zip_code": null
}
],
"service": "ca-contractor-lookup"
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.04.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.scrapebench.dev/v1/ca-contractor-lookup' \
-H 'content-type: application/json' \
--data-raw '{"license_number":"22726"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.scrapebench.dev/v1/ca-contractor-lookup' \
-H 'content-type: application/json' \
--data-raw '{"license_number":"22726"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.04 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.04" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.04 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.scrapebench.dev%2Fv1%2Fca-contractor-lookup&method=POST
const res = await pay("https://api.scrapebench.dev/v1/ca-contractor-lookup", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"license_number": "22726"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.04 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.04"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://api.scrapebench.dev/v1/ca-contractor-lookup",
json={
"license_number": "22726",
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 51 min ago | Passed | 402 | 633 ms | $0.04 |
| 6 h ago | Passed | 402 | 668 ms | $0.04 |
| 11 h ago | Passed | 402 | 2.1 s | $0.04 |
| 17 h ago | Passed | 402 | 1.5 s | $0.04 |
| 22 h ago | Expected HTTP 402, got 502 | 502 | 610 ms | - |
Show 8 older checks
| 27 h ago | Passed | 402 | 2.3 s | $0.04 |
| 32 h ago | Passed | 402 | 2.0 s | $0.04 |
| 37 h ago | Passed | 402 | 1.4 s | $0.04 |
| 42 h ago | Passed | 402 | 2.3 s | $0.04 |
| 46 h ago | Expected HTTP 402, got 530 | 530 | 59 ms | - |
| 2 days ago | Passed | 402 | 1.5 s | $0.04 |
| 2 days ago | Passed | 402 | 1.3 s | $0.04 |
| 3 days ago | Passed | 402 | 2.8 s | $0.04 |