{"id":"property-violations-history","title":"Property Code-Violation & Lien History (Open-Data Cities)","description":"Before buying, leasing or insuring a US property, reads the city's own open-data code-enforcement records for one address (or a NYC BBL/BIN) and returns normalized violations with date opened, category, description, open/closed status, source severity class and record URL; deterministic counts by status, category and year; days since the latest violation; the longest repeat-citation streak (citations within 90 days of each other); and a rule-based distress indicator (none/watch/elevated) with every rule, value and threshold shown (open_records 1/5, open_hazardous 1/3, recent_records 3/10, repeat_streak 3/6, lien_listings 1/2). NYC also reads DOB/ECB summonses and the DOF tax/water lien sale list by tax lot. Covered cities: New York City, NY, Chicago, IL, San Francisco, CA, Seattle, WA, Austin, TX, Los Angeles, CA, Philadelphia, PA, Boston, MA. An uncovered city is rejected with the supported list before payment. Addresses are normalized and matched on number, direction, street and type; differently written streets are reported but never merged, and ambiguous matches return INSUFFICIENT_DATA. No LLM. Reports public records only: not ownership, title or legal advice; no alerts; private records and county tax-lien sales are not checked, and lien data is covered only for NYC.","roi":"A buyer, lender or agent gets a source-linked, reproducible record of a building's enforcement history and a transparent distress flag, instead of an unsourced model summary or a manual hunt across city portals.","audience":"business","channels":["x402","mcp","rapidapi","apify"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/property-violations","path":"/api/v1/property-violations","contentType":"application/json"},"price":{"amount":"0.05","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string","minLength":5,"maxLength":200,"description":"US street address with city and state, e.g. '447 21st Ave, San Francisco, CA 94121'. Give exactly one of address, bbl or bin."},"city":{"type":"string","maxLength":60,"description":"City, when not inside address. For NYC a borough name (Brooklyn, Queens, ...) narrows the match."},"state":{"type":"string","maxLength":2,"description":"Two-letter state, when not inside address."},"zip":{"type":"string","maxLength":10,"description":"ZIP code (informational; not used to widen a match)."},"bbl":{"type":"string","pattern":"^[1-5][0-9]{9}$","description":"NYC borough-block-lot, 10 digits."},"bin":{"type":"string","pattern":"^[1-5][0-9]{6}$","description":"NYC building identification number, 7 digits."},"lookback_years":{"type":"integer","minimum":1,"maximum":30,"description":"Years of history to read (default 10)."}}},"resultSchema":{"type":"object","required":["status","reason","as_of","match","counts","distress","violations","liens","not_checked","partial","disclaimer"],"properties":{"status":{"type":"string","enum":["RECORDS_FOUND","NO_RECORDS_FOUND","INSUFFICIENT_DATA"],"description":"INSUFFICIENT_DATA: the address was ambiguous or only matched differently written streets; nothing is reported rather than guessed."},"reason":{"type":"string"},"as_of":{"type":"string"},"lookback":{"type":"object","properties":{"years":{"type":"integer"},"from":{"type":"string"}}},"coverage":{"type":"object","description":"City, dataset ids with URLs, the address-matching rule and what the dates mean."},"match":{"type":"object","properties":{"confidence":{"type":"string","enum":["exact","identifier","none"]},"matched_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"queried_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_address_forms":{"type":"array","items":{"type":"string"}},"unmerged_street_variants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"records":{"type":"integer"}}}},"unparsed_source_rows":{"type":"integer"},"scope":{"type":"string"}}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"counted_in_rules":{"type":"integer"},"by_status":{"type":"object","properties":{"open":{"type":"integer"},"closed":{"type":"integer"},"unknown":{"type":"integer"}}},"by_kind":{"type":"object"},"by_category":{"type":"object"},"by_year":{"type":"object"},"undated":{"type":"integer"}}},"latest_violation":{"anyOf":[{"type":"object","properties":{"date":{"type":"string"},"days_since":{"type":"integer"}}},{"type":"null"}]},"repeat_streak":{"type":"object","properties":{"window_days":{"type":"integer"},"longest_run":{"type":"integer"},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"end":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"distress":{"type":"object","description":"Rule-based indicator: the highest level any rule reaches. Every rule, value and threshold is listed.","properties":{"indicator":{"type":"string","enum":["none","watch","elevated"]},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"metric":{"type":"string"},"value":{"type":"integer"},"watch_at":{"type":"integer"},"elevated_at":{"type":"integer"},"level":{"type":"string","enum":["none","watch","elevated"]}}}},"not_evaluated":{"type":"array","items":{"type":"string"}}}},"violations_total":{"type":"integer"},"violations_returned":{"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string"},"dataset":{"type":"string"},"record_id":{"type":"string"},"record_url":{"type":"string"},"kind":{"type":"string","enum":["violation","case","complaint"]},"opened":{"anyOf":[{"type":"string"},{"type":"null"}]},"date_basis":{"type":"string","enum":["opened","status_date"]},"category":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["open","closed","unknown"]},"source_status":{"type":"string"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}]},"severe":{"type":"boolean"},"source_address":{"type":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"liens":{"type":"object","properties":{"covered":{"type":"boolean"},"checked":{"type":"boolean"},"records":{"type":"array","items":{"type":"object"}},"note":{"type":"string"}}},"complaints_note":{"type":"string"},"truncated":{"type":"boolean"},"partial":{"type":"boolean"},"failures":{"type":"array","items":{"type":"string"}},"not_checked":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"reason":{"type":"string"}}}},"supported_cities":{"type":"array","items":{"type":"string"}},"source_manifest":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"dataset":{"type":"string"},"url":{"type":"string"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"type":"string"}}}},"llm":{"type":"string","enum":["not_used"]},"disclaimer":{"type":"string"}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","required":["status","reason","as_of","match","counts","distress","violations","liens","not_checked","partial","disclaimer"],"properties":{"status":{"type":"string","enum":["RECORDS_FOUND","NO_RECORDS_FOUND","INSUFFICIENT_DATA"],"description":"INSUFFICIENT_DATA: the address was ambiguous or only matched differently written streets; nothing is reported rather than guessed."},"reason":{"type":"string"},"as_of":{"type":"string"},"lookback":{"type":"object","properties":{"years":{"type":"integer"},"from":{"type":"string"}}},"coverage":{"type":"object","description":"City, dataset ids with URLs, the address-matching rule and what the dates mean."},"match":{"type":"object","properties":{"confidence":{"type":"string","enum":["exact","identifier","none"]},"matched_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"queried_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_address_forms":{"type":"array","items":{"type":"string"}},"unmerged_street_variants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"records":{"type":"integer"}}}},"unparsed_source_rows":{"type":"integer"},"scope":{"type":"string"}}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"counted_in_rules":{"type":"integer"},"by_status":{"type":"object","properties":{"open":{"type":"integer"},"closed":{"type":"integer"},"unknown":{"type":"integer"}}},"by_kind":{"type":"object"},"by_category":{"type":"object"},"by_year":{"type":"object"},"undated":{"type":"integer"}}},"latest_violation":{"anyOf":[{"type":"object","properties":{"date":{"type":"string"},"days_since":{"type":"integer"}}},{"type":"null"}]},"repeat_streak":{"type":"object","properties":{"window_days":{"type":"integer"},"longest_run":{"type":"integer"},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"end":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"distress":{"type":"object","description":"Rule-based indicator: the highest level any rule reaches. Every rule, value and threshold is listed.","properties":{"indicator":{"type":"string","enum":["none","watch","elevated"]},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"metric":{"type":"string"},"value":{"type":"integer"},"watch_at":{"type":"integer"},"elevated_at":{"type":"integer"},"level":{"type":"string","enum":["none","watch","elevated"]}}}},"not_evaluated":{"type":"array","items":{"type":"string"}}}},"violations_total":{"type":"integer"},"violations_returned":{"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string"},"dataset":{"type":"string"},"record_id":{"type":"string"},"record_url":{"type":"string"},"kind":{"type":"string","enum":["violation","case","complaint"]},"opened":{"anyOf":[{"type":"string"},{"type":"null"}]},"date_basis":{"type":"string","enum":["opened","status_date"]},"category":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["open","closed","unknown"]},"source_status":{"type":"string"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}]},"severe":{"type":"boolean"},"source_address":{"type":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"liens":{"type":"object","properties":{"covered":{"type":"boolean"},"checked":{"type":"boolean"},"records":{"type":"array","items":{"type":"object"}},"note":{"type":"string"}}},"complaints_note":{"type":"string"},"truncated":{"type":"boolean"},"partial":{"type":"boolean"},"failures":{"type":"array","items":{"type":"string"}},"not_checked":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"reason":{"type":"string"}}}},"supported_cities":{"type":"array","items":{"type":"string"}},"source_manifest":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"dataset":{"type":"string"},"url":{"type":"string"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"type":"string"}}}},"llm":{"type":"string","enum":["not_used"]},"disclaimer":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"address":"1255 S Wabash Ave, Chicago, IL","lookback_years":10},"openapiOperation":{"operationId":"property_violations_history","summary":"Property Code-Violation & Lien History (Open-Data Cities)","description":"Before buying, leasing or insuring a US property, reads the city's own open-data code-enforcement records for one address (or a NYC BBL/BIN) and returns normalized violations with date opened, category, description, open/closed status, source severity class and record URL; deterministic counts by status, category and year; days since the latest violation; the longest repeat-citation streak (citations within 90 days of each other); and a rule-based distress indicator (none/watch/elevated) with every rule, value and threshold shown (open_records 1/5, open_hazardous 1/3, recent_records 3/10, repeat_streak 3/6, lien_listings 1/2). NYC also reads DOB/ECB summonses and the DOF tax/water lien sale list by tax lot. Covered cities: New York City, NY, Chicago, IL, San Francisco, CA, Seattle, WA, Austin, TX, Los Angeles, CA, Philadelphia, PA, Boston, MA. An uncovered city is rejected with the supported list before payment. Addresses are normalized and matched on number, direction, street and type; differently written streets are reported but never merged, and ambiguous matches return INSUFFICIENT_DATA. No LLM. Reports public records only: not ownership, title or legal advice; no alerts; private records and county tax-lien sales are not checked, and lien data is covered only for NYC.\n\nPrice: 0.05 USDC on Base (x402).","x-x402-price-usdc":"0.05","x-x402-amount":"50000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.05"}},"x-audience":"business","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/property-violations-history","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string","minLength":5,"maxLength":200,"description":"US street address with city and state, e.g. '447 21st Ave, San Francisco, CA 94121'. Give exactly one of address, bbl or bin."},"city":{"type":"string","maxLength":60,"description":"City, when not inside address. For NYC a borough name (Brooklyn, Queens, ...) narrows the match."},"state":{"type":"string","maxLength":2,"description":"Two-letter state, when not inside address."},"zip":{"type":"string","maxLength":10,"description":"ZIP code (informational; not used to widen a match)."},"bbl":{"type":"string","pattern":"^[1-5][0-9]{9}$","description":"NYC borough-block-lot, 10 digits."},"bin":{"type":"string","pattern":"^[1-5][0-9]{6}$","description":"NYC building identification number, 7 digits."},"lookback_years":{"type":"integer","minimum":1,"maximum":30,"description":"Years of history to read (default 10)."}}},"example":{"address":"1255 S Wabash Ave, Chicago, IL","lookback_years":10}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","required":["status","reason","as_of","match","counts","distress","violations","liens","not_checked","partial","disclaimer"],"properties":{"status":{"type":"string","enum":["RECORDS_FOUND","NO_RECORDS_FOUND","INSUFFICIENT_DATA"],"description":"INSUFFICIENT_DATA: the address was ambiguous or only matched differently written streets; nothing is reported rather than guessed."},"reason":{"type":"string"},"as_of":{"type":"string"},"lookback":{"type":"object","properties":{"years":{"type":"integer"},"from":{"type":"string"}}},"coverage":{"type":"object","description":"City, dataset ids with URLs, the address-matching rule and what the dates mean."},"match":{"type":"object","properties":{"confidence":{"type":"string","enum":["exact","identifier","none"]},"matched_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"queried_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_address_forms":{"type":"array","items":{"type":"string"}},"unmerged_street_variants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"records":{"type":"integer"}}}},"unparsed_source_rows":{"type":"integer"},"scope":{"type":"string"}}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"counted_in_rules":{"type":"integer"},"by_status":{"type":"object","properties":{"open":{"type":"integer"},"closed":{"type":"integer"},"unknown":{"type":"integer"}}},"by_kind":{"type":"object"},"by_category":{"type":"object"},"by_year":{"type":"object"},"undated":{"type":"integer"}}},"latest_violation":{"anyOf":[{"type":"object","properties":{"date":{"type":"string"},"days_since":{"type":"integer"}}},{"type":"null"}]},"repeat_streak":{"type":"object","properties":{"window_days":{"type":"integer"},"longest_run":{"type":"integer"},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"end":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"distress":{"type":"object","description":"Rule-based indicator: the highest level any rule reaches. Every rule, value and threshold is listed.","properties":{"indicator":{"type":"string","enum":["none","watch","elevated"]},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"metric":{"type":"string"},"value":{"type":"integer"},"watch_at":{"type":"integer"},"elevated_at":{"type":"integer"},"level":{"type":"string","enum":["none","watch","elevated"]}}}},"not_evaluated":{"type":"array","items":{"type":"string"}}}},"violations_total":{"type":"integer"},"violations_returned":{"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string"},"dataset":{"type":"string"},"record_id":{"type":"string"},"record_url":{"type":"string"},"kind":{"type":"string","enum":["violation","case","complaint"]},"opened":{"anyOf":[{"type":"string"},{"type":"null"}]},"date_basis":{"type":"string","enum":["opened","status_date"]},"category":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["open","closed","unknown"]},"source_status":{"type":"string"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}]},"severe":{"type":"boolean"},"source_address":{"type":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"liens":{"type":"object","properties":{"covered":{"type":"boolean"},"checked":{"type":"boolean"},"records":{"type":"array","items":{"type":"object"}},"note":{"type":"string"}}},"complaints_note":{"type":"string"},"truncated":{"type":"boolean"},"partial":{"type":"boolean"},"failures":{"type":"array","items":{"type":"string"}},"not_checked":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"reason":{"type":"string"}}}},"supported_cities":{"type":"array","items":{"type":"string"}},"source_manifest":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"dataset":{"type":"string"},"url":{"type":"string"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"type":"string"}}}},"llm":{"type":"string","enum":["not_used"]},"disclaimer":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/property-violations-history/","docsJson":"https://agents.writerslogic.com/docs/property-violations-history.json","sample":"https://agents.writerslogic.com/api/v1/samples/property-violations-history","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}