Better Vetters · API reference · llms.txt · Pricing

Add contractor license checks to any agent

One call tells your agent whether a US contractor is real, licensed and pulling permits, from official state license boards and city permit portals (WA, CA, FL, TX, NYC, OR, CT, Pittsburgh PA). REST or MCP. Every key gets 50 free checks a month; misses are never charged; then $0.15 per matched check.

Fastest start: MCP endpoint https://api.bettervetters.com/mcp. Tools: check_contractor, get_coverage (free) and get_free_api_key (free, no card). Or POST https://api.bettervetters.com/v1/keys for a key over REST.

Claude, ChatGPT and other chat apps (no headers needed) MCP tools tested

Add https://api.bettervetters.com/mcp as a custom connector (Claude: Settings > Connectors > Add custom connector; ChatGPT: developer-mode connectors). Connecting needs no auth. The agent gets its own free key with the get_free_api_key tool and passes it to check_contractor as api_key.

Connector URL: https://api.bettervetters.com/mcp   (no auth needed to connect)

Then just ask:
  "Use Better Vetters to get a free API key, then check whether
   Valentine Roofing LLC in Seattle, WA is licensed."

The agent calls get_free_api_key once, then check_contractor with api_key=<that key>.

Claude Code

One command. Get a key first with the curl below, or let the agent call get_free_api_key.

claude mcp add --transport http better-vetters https://api.bettervetters.com/mcp \
  --header "Authorization: Bearer bv_live_YOUR_KEY"

Cursor JSON validated

Cursor reads remote MCP servers with custom headers from mcp.json.

// ~/.cursor/mcp.json  (or .cursor/mcp.json in a project)
{
  "mcpServers": {
    "better-vetters": {
      "url": "https://api.bettervetters.com/mcp",
      "headers": { "Authorization": "Bearer bv_live_YOUR_KEY" }
    }
  }
}

VS Code (Copilot agent mode) JSON validated

VS Code supports streamable-HTTP MCP servers with headers.

// .vscode/mcp.json
{
  "servers": {
    "better-vetters": {
      "type": "http",
      "url": "https://api.bettervetters.com/mcp",
      "headers": { "Authorization": "Bearer bv_live_YOUR_KEY" }
    }
  }
}

MCP from Python (official SDK) tested 2026-12-04

No key in your config: the script gets a free key over MCP, then checks a contractor.

import asyncio, json
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client  # pip install "mcp>=2"

async def main():
    async with streamable_http_client("https://api.bettervetters.com/mcp") as streams:
        async with ClientSession(streams[0], streams[1]) as s:
            await s.initialize()
            key = json.loads((await s.call_tool("get_free_api_key", {"label": "my-agent"})).content[0].text)["api_key"]
            out = await s.call_tool("check_contractor", {"name": "Valentine Roofing LLC", "state": "WA", "api_key": key})
            print(json.loads(out.content[0].text)["verdict"])

asyncio.run(main())

REST with curl tested 2026-12-04

Two calls: create a free key, then check. Misses (not_found, out_of_coverage) are never charged.

# 1. free key (50 checks a month, shown once)
KEY=$(curl -s -X POST https://api.bettervetters.com/v1/keys \
  -H 'content-type: application/json' -d '{"label":"my-agent"}' | jq -r .api_key)

# 2. check a contractor
curl -s -X POST https://api.bettervetters.com/v1/contractor/check \
  -H "Authorization: Bearer $KEY" -H 'content-type: application/json' \
  -d '{"name":"Valentine Roofing LLC","state":"WA","city":"Seattle"}' | jq '{status,verdict,trust_score}'

REST from Python tested 2026-12-04

Plain requests. A 402 means the free checks and credits are used up; the body's top_up lists packs and plans.

import os, requests

BASE = "https://api.bettervetters.com"
KEY = os.environ["BETTER_VETTERS_API_KEY"]  # free: POST /v1/keys

def check_contractor(name, state=None, city=None, license_number=None, phone=None, website=None):
    body = {k: v for k, v in dict(name=name, state=state, city=city, license_number=license_number,
                                  phone=phone, website=website).items() if v}
    r = requests.post(f"{BASE}/v1/contractor/check", json=body, timeout=30,
                      headers={"Authorization": f"Bearer {KEY}"})
    r.raise_for_status()  # 402 = out of free checks and credits (see body.top_up)
    return r.json()

res = check_contractor("Valentine Roofing LLC", state="WA", city="Seattle")
print(res["verdict"], res["trust_score"], res["license"]["status"])

REST from JavaScript / TypeScript tested 2026-12-04 (Node)

Node 18+, Deno, Bun or the browser (server-side only: keep the key secret).

const res = await fetch("https://api.bettervetters.com/v1/contractor/check", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.BETTER_VETTERS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "Valentine Roofing LLC", state: "WA", city: "Seattle" }),
});
const r = await res.json();
console.log(r.verdict, r.trust_score, r.license?.status);

OpenAI function calling / any tool-calling LLM JSON validated

Give the model this tool schema and forward its arguments to the REST endpoint.

{
  "type": "function",
  "function": {
    "name": "check_contractor",
    "description": "Check a US contractor against official licence, permit and discipline records (WA, CA, FL, TX, NYC, OR, CT, Pittsburgh PA). Returns verdict, trust_score 0-100, licence status and permits.",
    "parameters": {
      "type": "object",
      "properties": {
        "name":  { "type": "string", "description": "Business name, e.g. 'Valentine Roofing LLC'" },
        "state": { "type": "string", "description": "2-letter state code, e.g. WA" },
        "city":  { "type": "string" },
        "license_number": { "type": "string" },
        "phone": { "type": "string" },
        "website": { "type": "string" }
      },
      "required": ["name"]
    }
  }
}
// When the model calls it, POST the arguments as JSON to
// https://api.bettervetters.com/v1/contractor/check with Authorization: Bearer <key>.

LangChain / LangGraph tested 2026-12-04 (langchain-core)

A typed tool that works with bind_tools and create_react_agent.

import os, requests
from langchain_core.tools import tool

@tool
def check_contractor(name: str, state: str = "", city: str = "", license_number: str = "") -> dict:
    """Check a US contractor's licence, permits and discipline in official public records.
    Use before hiring or recommending a contractor. state is a 2-letter code (WA, CA, FL, TX, NY, OR, CT, PA)."""
    body = {k: v for k, v in dict(name=name, state=state, city=city, license_number=license_number).items() if v}
    r = requests.post("https://api.bettervetters.com/v1/contractor/check", json=body, timeout=30,
                      headers={"Authorization": f"Bearer {os.environ['BETTER_VETTERS_API_KEY']}"})
    r.raise_for_status()
    d = r.json()
    return {k: d.get(k) for k in ("status", "verdict", "trust_score", "license", "permits", "reasons")}

# llm.bind_tools([check_contractor])  or  create_react_agent(llm, [check_contractor])

CrewAI

Wrap the same call as a CrewAI tool for a vetting agent.

import os, requests
from crewai.tools import tool

@tool("Check contractor licence")
def check_contractor(name: str, state: str = "", city: str = "") -> str:
    """Check a US contractor's licence, permits and discipline in official public records."""
    r = requests.post("https://api.bettervetters.com/v1/contractor/check", timeout=30,
                      json={k: v for k, v in dict(name=name, state=state, city=city).items() if v},
                      headers={"Authorization": f"Bearer {os.environ['BETTER_VETTERS_API_KEY']}"})
    return r.text

# Agent(role="Contractor vetter", tools=[check_contractor], ...)

n8n

Vet every new vendor or lead in a workflow with one HTTP Request node.

HTTP Request node
  Method:   POST
  URL:      https://api.bettervetters.com/v1/contractor/check
  Authentication: Generic Credential Type > Header Auth
            Name: Authorization   Value: Bearer bv_live_YOUR_KEY
  Send Body: JSON
            {"name": "{{ $json.company }}", "state": "{{ $json.state }}", "city": "{{ $json.city }}"}

Then branch with an IF node on {{ $json.verdict }}  (trusted / likely_ok / caution / high_risk / needs_review / not_found).

Zapier and Make

No code: a webhook step checks the contractor and returns the verdict.

Zapier: Webhooks by Zapier > Custom Request   |   Make: HTTP > Make a request
  Method:  POST
  URL:     https://api.bettervetters.com/v1/contractor/check
  Headers: Authorization: Bearer bv_live_YOUR_KEY
           Content-Type: application/json
  Data:    {"name":"<company from your form>","state":"WA","city":"Seattle"}
Use the returned verdict and trust_score to route the lead or flag the vendor.

What comes back

status (matched, not_found, permits_only, out_of_coverage), verdict (trusted, likely_ok, caution, high_risk, needs_review, unknown), trust_score 0-100, match.confidence, license (number, type, status, expiry, board link), permits, discipline, reasons[], data_freshness and billing. Full schema: /docs and /openapi.json. How scoring works: bettervetters.com/how-it-works.

Public records, not a consumer report. Do not use for employment, credit, insurance or tenant-screening decisions. A missing record is not proof of a problem.