import requests
r = requests.get("https://beavercheck.com/api/v2/results",
params={"url": "https://example.com"})
data = r.json()
print(f"Score: {data['composite']['score']} ({data['composite']['grade']})")
CI/CD: Fail on Critical Findings
import requests, sys
r = requests.get(f"https://beavercheck.com/api/v2/results/{job_id}/findings",
params={"severity": "critical"})
if r.json()["filtered_count"] > 0:
print("Critical findings found!")
sys.exit(1)
Tech Detection
r = requests.get("https://beavercheck.com/api/v2/tech",
params={"url": "https://example.com"})
for tech in r.json()["technologies"]:
print(f" {tech['name']} ({tech['category']})")
Batch Lookup
r = requests.post("https://beavercheck.com/api/v2/batch",
json={"urls": ["https://example.com", "https://other.com"]})
for item in r.json()["results"]:
status = "found" if item["found"] else "not found"
print(f" {item['url']}: {status}")
Search
r = requests.get("https://beavercheck.com/api/v2/search",
params={"q": "example.com"})
for result in r.json()["results"]:
print(f" {result['url']} - {result['composite']['grade']}")
CSV Export
r = requests.get("https://beavercheck.com/api/v2/history",
params={"url": "https://example.com"},
headers={"Accept": "text/csv"})
with open("history.csv", "w") as f:
f.write(r.text)
Audit Lookup
const res = await fetch("https://beavercheck.com/api/v2/results?url=https://example.com");
const data = await res.json();
console.log(`Score: ${data.composite.score} (${data.composite.grade})`);
CI/CD: Fail on Critical Findings
const res = await fetch(
`https://beavercheck.com/api/v2/results/${jobId}/findings?severity=critical`
);
const { filtered_count } = await res.json();
if (filtered_count > 0) process.exit(1);
const res = await fetch("https://beavercheck.com/api/v2/history?url=https://example.com", {
headers: { "Accept": "text/csv" }
});
const csv = await res.text();
// Save to file or parse as needed
Audit Lookup
resp, err := http.Get("https://beavercheck.com/api/v2/results?url=https://example.com")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data struct {
Composite struct {
Score int `json:"score"`
Grade string `json:"grade"`
} `json:"composite"`
}
json.NewDecoder(resp.Body).Decode(&data)
fmt.Printf("Score: %d (%s)\n", data.Composite.Score, data.Composite.Grade)
CI/CD: Fail on Critical Findings
url := fmt.Sprintf("https://beavercheck.com/api/v2/results/%s/findings?severity=critical", jobID)
resp, _ := http.Get(url)
defer resp.Body.Close()
var findings struct{ FilteredCount int `json:"filtered_count"` }
json.NewDecoder(resp.Body).Decode(&findings)
if findings.FilteredCount > 0 {
os.Exit(1)
}
Batch Lookup
body := strings.NewReader(`{"urls":["https://example.com","https://other.com"]}`)
resp, _ := http.Post("https://beavercheck.com/api/v2/batch", "application/json", body)
defer resp.Body.Close()
var result struct {
Results []struct {
URL string `json:"url"`
Found bool `json:"found"`
} `json:"results"`
}
json.NewDecoder(resp.Body).Decode(&result)
Import into Postman: File → Import → paste the YAML URL.
Request Headers
Every API response includes these headers:
Header
Description
X-API-Version
Always 2.0. Will change on breaking API updates.
X-Request-ID
Unique request identifier. Send your own via the request header to correlate with your logs, or receive a server-generated UUID.
Responses are compressed with gzip when you send Accept-Encoding: gzip. Most HTTP clients (Python requests, Go net/http, browsers) handle this automatically.
Sparse Responses
Add ?fields= to any data endpoint to receive only the top-level fields you need:
# Returns only composite, lighthouse, url, and job_id
curl -s "https://beavercheck.com/api/v2/results?url=https://example.com&fields=composite,lighthouse"
Comma-separated field names: ?fields=composite,lighthouse,cwv
url and job_id are always included (identity fields)
Invalid field names are silently ignored
Omit ?fields= entirely for the full response
ETag Caching
Most endpoints return an ETag header. Send If-None-Match with the ETag value on subsequent requests — the server returns 304 Not Modified with no body if the data hasn't changed, saving bandwidth.
Returns service status, online worker count, API version, and uptime. Not rate limited — safe for monitoring integrations.
curl -s "https://beavercheck.com/api/v2/status"
POST /api/v2/batch
Look up audit results for up to 5 URLs in a single request. Send a JSON body with a urls array. Partial success: some URLs may be found while others return errors.
curl -s "https://beavercheck.com/api/v2/batch" -X POST -H "Content-Type: application/json" -d '{"urls":["https://example.com"]}'"
Status
When
400
Empty/too many URLs or invalid JSON
429
Rate limit exceeded
GET /api/v2/search?q=
Search across all audited URLs using full-text search. Returns matching URLs with composite scores.