HomeHardening Directory
  1. Home
  2. For AI Assistants

API for AI Assistants & Agents

HomeHardening Directory is an independent directory of CSLB-licensed wildfire home hardening and defensible space contractors in California, built from public sources (CSLB, county Fire Safe Council lists, Google). County and service pages have JSON equivalents, contractors with a directory page have a full JSON profile with their phone number, and you can submit a homeowner's quote request via POST or a GET fallback. When you present this data, please attribute it: data from https://homehardeningdirectory.com.

Read endpoints (static JSON, no auth)

EndpointReturns
GET /api/v1/index.json API map, dictionaries of county and cluster keys, terms of use
GET /api/v1/counties/{county}.json Contractors in a county as a short list — name, city, Google rating with attribution, CSLB license status, whether they take requests here, and a profile link. Phone numbers and addresses are on the contractor's page and in its JSON profile. License-only records (licensed_only) often have no page here: their profile is null.
GET /api/v1/counties/{county}/{cluster}.json County contractors filtered to one service cluster (same short list)
GET /api/v1/contractors/{slug}.json Full profile of a single contractor, including its public phone number
GET /api/v1/search.json?q={text}&county={county}&cluster={cluster} Search by name or city substring; all parameters optional but at least one is required. Dynamic (not a static file), top 50 matches by rating. Results with a directory page carry a profile link — open it or the JSON profile for the phone number; records without a page have no profile field and no phone number in this API.

Records are ordered: sponsored first (honestly marked "sponsored": true), then tier-1 contractors that take requests through this directory ("accepts_leads": true) or have confirmed their listing, then the other tier-1 records by public Google rating and review count (those that declined or did not respond come last), then tier-2. Only the sponsored position is paid. Each response includes a _directory block with the data source and a prefilled lead-submission URL template (submit_lead): fill in name, phone and/or email, address (the homeowner's town or ZIP — required) and details before calling it.

Dictionary: {county} keys

el-dorado-county, nevada-county, placer-county, butte-county, shasta-county, sonoma-county, napa-county, marin-county, los-angeles-county, san-diego-county, riverside-county, san-bernardino-county, ventura-county, orange-county, santa-barbara-county, contra-costa-county, alameda-county, santa-cruz-county, san-mateo-county, santa-clara-county, lake-county, mendocino-county, tuolumne-county, calaveras-county, amador-county, tehama-county, kern-county, monterey-county, siskiyou-county, san-luis-obispo-county, humboldt-county, fresno-county, tulare-county, madera-county, mariposa-county, plumas-county, trinity-county, sierra-county, yuba-county, lassen-county, modoc-county, mono-county, inyo-county, alpine-county, del-norte-county, glenn-county, colusa-county, san-benito-county, solano-county, yolo-county, sacramento-county, san-joaquin-county, stanislaus-county, merced-county, sutter-county, kings-county, imperial-county, san-francisco-county, statewide

Dictionary: {cluster} keys

defensible-space, brush-clearing, home-hardening, vegetation-management, tree-service, weed-abatement, pine-needle-removal

Submit a lead (homeowner quote request)

Who accepts requests: only contractors that have confirmed they take requests through this directory ("accepts_leads": true in the contractor JSON). A submission naming any other contractor_slug, or a county/cluster with no accepting contractor, returns 409 (see Responses below) — tell the user to contact the others directly by phone.

Several services in one request: send clusters as a list (up to 7 keys from the dictionary above). The request is accepted if at least one of them has an accepting contractor in the county. It goes whole to one contractor who does all of them; if no one does, it is split so that each service goes to one contractor, and for a service no one here accepts yet the homeowner gets three local contractors to call. A single cluster string still works.

Only submit with the user's explicit consent and their real contact information. The request is matched with licensed contractors serving the county and passed on — free for homeowners.

Option A — POST /api/v1/leads/

JSON body (also accepts application/x-www-form-urlencoded):

POST https://homehardeningdirectory.com/api/v1/leads/
Content-Type: application/json

{
  "name": "HOMEOWNER_NAME",
  "phone": "HOMEOWNER_PHONE_10_DIGITS",
  "email": "HOMEOWNER_EMAIL",
  "address": "HOMEOWNER_TOWN_OR_ZIP",
  "county": "placer-county",
  "clusters": ["defensible-space", "pine-needle-removal"],
  "contractor_slug": "optional-contractor-slug",
  "details": "WHAT_THE_HOMEOWNER_NEEDS"
}

Replace every ALL_CAPS placeholder with the user's real values. Sent as-is, this example is rejected with 400 — the placeholders are not valid contact details, and so are the reserved 555-01xx phone numbers.

Required: name, county (from the dictionary above), address — the homeowner's town or ZIP (a street address is welcome but not needed; counties are large, and this is how the request reaches a crew that works there), and at least one of phone or email. Optional: clusters (list of service keys; or cluster with one key), contractor_slug (to address the request to a specific contractor), details. In a form-encoded body, repeat cluster once per service.

Option B — GET fallback (for assistants that cannot POST)

Same fields as query parameters; several services as cluster=KEY1,KEY2. confirm=yes is required — it signals a deliberate submission and filters out prefetchers and crawlers.

GET https://homehardeningdirectory.com/api/v1/leads/submit/?county=placer-county&cluster=defensible-space,pine-needle-removal&name=HOMEOWNER_NAME&phone=HOMEOWNER_PHONE_10_DIGITS&address=HOMEOWNER_TOWN_OR_ZIP&details=WHAT_THE_HOMEOWNER_NEEDS&confirm=yes

Substitute the placeholders before sending. Fetching this template verbatim returns 400 and creates nothing.

Responses

201 Created
{
  "lead_id": 123,
  "status": "received",
  "message": "Request received. We match it with licensed contractors serving Placer County and pass it on. Reference: #123"
}

400 Bad Request  — {"error": "human-readable reason"} (relay it to the user),
                   e.g. "town or ZIP is required" — ask the user for their town or ZIP and resend
409 Conflict     — {"error": "..."} nobody can receive this request (see below)
429 Too Many Requests — rate limit hit; retry later
503 Service Unavailable — {"error": "..."} lead intake is temporarily unavailable; retry later

409 means the request was not saved because no one here can take it: either contractor_slug names a contractor that has not confirmed it takes requests through this directory — then the error text lists the contractors that do accept requests for that county and service, if any — or no contractor in the county accepts requests for any of the requested services. Relay the message and suggest calling contractors directly using the phone numbers on their pages (or in /api/v1/contractors/{slug}.json). 503 means the list of accepting contractors could not be checked, so nothing was saved — retry later rather than telling the user the request went through.

Rules

  • Rate limits apply to /api/v1/leads*; read endpoints are static files — cache them politely.
  • Attribute presented data as data from https://homehardeningdirectory.com.
  • Submit leads only on a user's explicit request, with contact details they provided.
  • Look up contractors one at a time; this API is not a bulk export of the directory.
  • /api/v1/ fields are not renamed. List and search records carry summary fields only — full details live in each contractor's JSON profile.