{"openapi":"3.1.0","info":{"title":"State Farm API (Bowmark)","version":"e833508f87ff","description":"Quotes from the largest US home and auto insurer across every line it publishes — auto, home, renters, condo, life, small business, pet, the recreational vehicle and specialty products, and supplemental health — plus the authoritative directory of the State Farm agents who write them.\n\nEvery function Bowmark has for State Farm (statefarm.com) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/statefarm/findAgent":{"post":{"operationId":"findAgent","summary":"Lists the State Farm agents in a city — name, office street address, ZIP, phone and the agent's own page — from the carrier's own published directory, which is the authoritative roster of the people w","description":"Lists the State Farm agents in a city — name, office street address, ZIP, phone and the agent's own page — from the carrier's own published directory, which is the authoritative roster of the people who actually bind a State Farm policy. Takes a city and a two-letter state; State Farm indexes this directory BY CITY and not by ZIP (its agent sitemap carries 51 state, 6,675 city and 19,111 agent URLs and no ZIP-keyed URL at all), so `zip` is an optional filter over the city's offices rather than a radius search. Returns every office the city publishes in the directory's own order — there is no paging and no result cap (177 for Chicago, 17 for Springfield IL, 1 for Homer AK). `zip` is always five digits even though State Farm publishes ZIP+4 on most offices, with the full form kept in `zipPlus4`, so comparing on it actually works. NEVER returns an empty array: a city State Farm does not index is answered by the site with HTTP 200 and its generic locator page, so that case THROWS `StatefarmCityNotIndexed` naming the closest slugs the state really publishes (State Farm abbreviates some — \"corona-dl-mar\", \"lk-havasu-cty\" — and its own slug is always accepted as `city`). A ZIP that matches no office in the city throws a DIFFERENT error, `StatefarmZipNotInCity`, naming the ZIPs it does list — the two are separate classes because they say opposite things about the city, so \"no agent in that ZIP\" can never be mistaken for a misspelt city.\n\nCalls `bowmark.providers.statefarm.findAgent`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<StatefarmAgent[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/StatefarmAgentQuery","description":"TypeScript: `StatefarmAgentQuery`"},"limit":{"type":"number","description":"TypeScript: `number`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/statefarm/getLifeQuote":{"post":{"operationId":"getLifeQuote","summary":"Prices State Farm term life from the carrier's own rating engine and returns real premiums — monthly and annual, with and without riders, plus the rate class — for a date of birth, sex, self-rated hea","description":"Prices State Farm term life from the carrier's own rating engine and returns real premiums — monthly and annual, with and without riders, plus the rate class — for a date of birth, sex, self-rated health band, tobacco recency, coverage amount and term. This is a RATE LOOKUP, not an application: it sends no name, email, phone or address (the request carries those fields empty, which is the shape State Farm's own app sends before its contact step), authorises no credit check and mints no consent record, so nothing about calling it makes the caller a sales lead. One call returns the whole indicative table around the request — 15 rows measured, being 10/20/30-year terms across $100k/$250k/$500k/$1M/$3M — with `requested: true` marking the combination asked for, so comparing terms or coverage levels costs no extra call. What actually moves the price, all measured: DATE OF BIRTH (not age — the engine derives age itself), sex, health band, BUILD (5ft10 at 175 lb is $27.84/mo and the same person at 260 lb is $46.99/mo, which is why height and weight are required inputs rather than an assumed average), and tobacco RECENCY rather than a yes/no (a 35-year-old male, best band, $500k/20yr: never used $27.84/mo at rate class 8, last used this year $87.44 at class 4, one year ago $36.09, three years ago back to $27.84). What does NOT move it is `state` — identical to the cent across IL, CA, NY and FL with state-specific request ids — so quoting one risk in four states returns four identical tables and is not worth the calls. Term only: State Farm's whole-life and final-expense products are priced by the same endpoint under a different product token and are not this function. Throws rather than returning [] when the engine prices nothing, because an empty array here would read as \"no cover available\" when it usually means the request was malformed.\n\nCalls `bowmark.providers.statefarm.getLifeQuote`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<StatefarmLifeQuote[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/StatefarmLifeQuoteQuery","description":"TypeScript: `StatefarmLifeQuoteQuery`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/statefarm/getRentersQuote":{"post":{"operationId":"getRentersQuote","summary":"Prices State Farm renters insurance for a US ZIP and returns the carrier's own monthly estimate — a low and a high bound in dollars, plus the city and state it resolved the ZIP to and State Farm's own","description":"Prices State Farm renters insurance for a US ZIP and returns the carrier's own monthly estimate — a low and a high bound in dollars, plus the city and state it resolved the ZIP to and State Farm's own words about what the number is. This is a PRICE LOOKUP, not an application: the ZIP is the only input, the request carries no name, date of birth, address or contact details (State Farm publishes this estimate before its flow asks for any of them), no consent is signed and no application is submitted, so calling it does not make the caller a sales lead. The estimate is genuinely local rather than a national average — measured 2026-07-31, Miami FL 33101 is $31-52/mo against New York NY 10001 at $8-14, Houston TX 77002 at $20-34, Springfield IL 62701 at $9-16 and Anchorage AK 99501 at $9-15 — and it is deterministic, the same ZIP returning the same range across repeated calls. It is an estimate for the ZIP, NOT a rated quote for a person or a chosen coverage amount: State Farm asks for those later in a flow that begins by collecting an identity, and this function deliberately stops before that. NEVER returns an empty or unpriced row. A state where State Farm writes no renters at all throws `StatefarmRentersNotOffered` (Massachusetts, measured), a ZIP served by a different State Farm flow throws `StatefarmRentersRoutedElsewhere` naming the URL (California, which a separate State Farm entity writes), and a ZIP State Farm cannot place throws `StatefarmRentersQuoteInput` — three separate classes because they say three different things, so \"State Farm will not cover you\" can never be mistaken for \"we could not read the page\".\n\nCalls `bowmark.providers.statefarm.getRentersQuote`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<StatefarmRentersQuote>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/StatefarmRentersQuoteQuery"},{"type":"string"}],"description":"TypeScript: `StatefarmRentersQuoteQuery | string`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/statefarm/getBusinessQuote":{"post":{"operationId":"getBusinessQuote","summary":"Prices a State Farm Business Owners Policy — commercial property and liability bundled — for one small business, and returns the carrier's own rated numbers: the assumed monthly instalment, the full 1","description":"Prices a State Farm Business Owners Policy — commercial property and liability bundled — for one small business, and returns the carrier's own rated numbers: the assumed monthly instalment, the full 12-month premium, the deductible the price assumes, every named discount that moved it, and all ~60 coverages in the bundle with which are actually switched on. Measured 2026-08-01: an accounting LLC in Springfield IL is $52.92/mo and $635 for the term on a $1,000 deductible with 38 of 60 coverages selected, while an attorneys' corporation in Austin TX is $57.66/mo and $691.92 with 37 of 59 — the coverage counts differ because State Farm rates a BOP off state forms, so the SAME business is a different policy in a different state. This is the commercial line, not a personal one, so it asks for facts no personal-lines quote does: the trade classification, whether the premises are tenanted or owner-occupied, floor area, year built, gross annual receipts, headcount and the business personal property to insure. None of them is defaulted, because a defaulted square footage returns a real premium for a business that does not exist. It is a RATE LOOKUP that State Farm will not perform anonymously: the engine refuses to price until it has the owner's name, date of birth, email and phone, so `identity` is a required argument carrying the CALLER's own details, passed at call time and never held. The four underwriting answers are required too and are deliberately not defaulted — State Farm refuses an online quote outright to a business with a loss in the past five years or an existing State Farm business policy, so answering those on the caller's behalf would hand back a price the carrier would not have given them. What comes back is a price, not an offer, and State Farm's own words for that are returned verbatim as `disclaimer`. Where State Farm declines to quote online it says WHY rather than returning nothing: `StatefarmBusinessNotQuotable` carries the carrier's own reason code and a severity, and the two mean opposite things — a SOFT kickout (an unsupported trade, an owner-occupied building, a religious or government organisation) means an agent writes that policy, while a HARD one (11 states, a prior loss, an existing policy) means there is no online quote to be had at all. Commercial auto and workers' compensation are NOT this function: State Farm's own application router sends commercial auto to a no-quote page and publishes no online application for workers' comp, contractors or farm-and-ranch.\n\nCalls `bowmark.providers.statefarm.getBusinessQuote`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<StatefarmBusinessQuote>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/StatefarmBusinessQuoteQuery","description":"TypeScript: `StatefarmBusinessQuoteQuery`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"QuoteIdentity":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"dob":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["firstName","lastName","dob","email","phone"],"additionalProperties":true},"StatefarmAgentQuery":{"type":"object","properties":{"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}},"required":["city","state"],"additionalProperties":true},"StatefarmBusinessQuoteQuery":{"type":"object","properties":{"identity":{"$ref":"#/components/schemas/QuoteIdentity"},"businessName":{"type":"string"},"businessDescription":{"type":"string"},"organizationType":{"type":"string"},"yearBusinessStarted":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"occupancy":{"type":"string"},"annualReceipts":{"type":"string"},"squareFeet":{"type":"string"},"yearBuilt":{"type":"string"},"businessPersonalPropertyLimit":{"type":"string"},"numberOfEmployees":{"type":"string"},"numberOfOfficersDirectors":{"type":"string"},"tenantImprovementsAmount":{"type":"string"},"hasPriorLossesInFiveYears":{"type":"boolean"},"hasExistingStateFarmBusinessPolicy":{"type":"boolean"},"hadInsuranceCancelledOrDeniedInThreeYears":{"type":"boolean"},"acknowledgesPrivacyDisclosure":{"type":"boolean"},"effectiveDate":{"type":"string"}},"required":["identity","businessName","businessDescription","organizationType","yearBusinessStarted","addressLine1","city","state","postalCode","occupancy","annualReceipts","squareFeet","yearBuilt","businessPersonalPropertyLimit","numberOfEmployees","numberOfOfficersDirectors","hasPriorLossesInFiveYears","hasExistingStateFarmBusinessPolicy","hadInsuranceCancelledOrDeniedInThreeYears","acknowledgesPrivacyDisclosure"],"additionalProperties":true},"StatefarmLifeQuoteQuery":{"type":"object","properties":{"dob":{"type":"string"},"sex":{"anyOf":[{"const":"Male"},{"const":"Female"}]},"health":{"anyOf":[{"const":"best"},{"const":"better"},{"const":"good"},{"const":"okay"}]},"coverageAmount":{"type":"number"},"termYears":{"anyOf":[{"const":10},{"const":20},{"const":30}]},"heightFeet":{"type":"number"},"heightInches":{"type":"number"},"weightPounds":{"type":"number"},"state":{"type":"string"},"tobaccoLastUsed":{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"required":["month","year"],"additionalProperties":true}},"required":["dob","sex","health","coverageAmount","termYears","heightFeet","heightInches","weightPounds","state"],"additionalProperties":true},"StatefarmRentersQuoteQuery":{"type":"object","properties":{"zip":{"type":"string"}},"required":["zip"],"additionalProperties":true}}}}