{"openapi":"3.1.0","info":{"title":"LenDb.ai public read API","version":"1.0.0-preview","summary":"Made for humans. Built for robots.","description":"Free, lender-neutral database of US mortgage loan officers. Every fact is sourced. Ranked results explain themselves with reasons[]. While LenDb is in preview, responses contain fictional sample data marked `sample: true`.","contact":{"email":"bot@lendb.ai","url":"https://lendb.ai/bot"}},"servers":[{"url":"https://lendb.ai/api/v1"}],"externalDocs":{"description":"llms-full.txt","url":"https://lendb.ai/llms-full.txt"},"paths":{"/loan-officers":{"get":{"operationId":"listLoanOfficers","summary":"Ranked loan officers for a specialty and place","parameters":[{"name":"specialty","in":"query","required":false,"description":"Taxonomy slug. Repeat or comma separate for several.","schema":{"type":"string","enum":["condo","condo-non-warrantable","co-op","multi-family-2-4","manufactured","rural","new-construction","mixed-use","condotel","vacation-home","fha","va","usda","jumbo","non-qm","dscr","bank-statement","reverse","renovation","construction","heloc","down-payment-assistance","self-employed","first-time-buyer","investor","foreign-national","itin","low-credit","recent-credit-event","physician","1099-income","asset-based"]}},{"name":"state","in":"query","required":false,"description":"Two-letter state code of the property. Hard filter on active license.","schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}},{"name":"city","in":"query","required":false,"description":"City of the property. Soft proximity boost.","schema":{"type":"string"}},{"name":"zip","in":"query","required":false,"description":"ZIP code of the property.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"ISO 639-1 language code. Hard filter.","schema":{"type":"string","pattern":"^[a-z]{2}$"}},{"name":"lender","in":"query","required":false,"description":"Lender name, slug, or NMLS ID.","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Free-text situation, parsed like /match.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (1 to 50).","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Ranked list","content":{"application/json":{"schema":{"type":"object","properties":{"sample":{"type":"boolean","description":"Present and true while the response contains fictional sample data."},"notice":{"type":"string"},"filters":{"type":"object"},"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/RankedLoanOfficer"}}}}}}}}}},"/loan-officers/{nmls_id}":{"get":{"operationId":"getLoanOfficer","summary":"One loan officer by NMLS ID","parameters":[{"name":"nmls_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"sample":{"type":"boolean","description":"Present and true while the response contains fictional sample data."},"notice":{"type":"string"},"loan_officer":{"$ref":"#/components/schemas/LoanOfficer"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/lenders":{"get":{"operationId":"listLenders","summary":"Lenders","parameters":[{"name":"q","in":"query","required":false,"description":"Name or DBA contains.","schema":{"type":"string"}},{"name":"state","in":"query","required":false,"description":"HQ state, or has loan officers licensed in the state.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Lender type.","schema":{"type":"string","enum":["bank","credit_union","imb","broker","other"]}},{"name":"limit","in":"query","required":false,"description":"Max results (1 to 100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Lenders","content":{"application/json":{"schema":{"type":"object","properties":{"sample":{"type":"boolean","description":"Present and true while the response contains fictional sample data."},"notice":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Lender"}}}}}}}}}},"/lenders/{nmls_id}":{"get":{"operationId":"getLender","summary":"One lender by company NMLS ID","parameters":[{"name":"nmls_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Lender","content":{"application/json":{"schema":{"type":"object","properties":{"sample":{"type":"boolean","description":"Present and true while the response contains fictional sample data."},"notice":{"type":"string"},"lender":{"$ref":"#/components/schemas/Lender"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/specialties":{"get":{"operationId":"listSpecialties","summary":"The specialty taxonomy","responses":{"200":{"description":"Taxonomy","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"specialties":{"type":"array","items":{"$ref":"#/components/schemas/Specialty"}},"languages":{"type":"object"}}}}}}}}},"/specialties/{slug}":{"get":{"operationId":"getSpecialty","summary":"One specialty","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","enum":["condo","condo-non-warrantable","co-op","multi-family-2-4","manufactured","rural","new-construction","mixed-use","condotel","vacation-home","fha","va","usda","jumbo","non-qm","dscr","bank-statement","reverse","renovation","construction","heloc","down-payment-assistance","self-employed","first-time-buyer","investor","foreign-national","itin","low-credit","recent-credit-event","physician","1099-income","asset-based"]}}],"responses":{"200":{"description":"Specialty","content":{"application/json":{"schema":{"type":"object","properties":{"specialty":{"$ref":"#/components/schemas/Specialty"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/match":{"get":{"operationId":"match","summary":"Free-text situation to ranked loan officers","description":"Example: `q=duplex in Austin, I am self-employed`. Returns the parsed filters plus ranked results with reasons.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2}},{"name":"state","in":"query","required":false,"description":"Override the parsed state.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Override the parsed language.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (1 to 50).","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Match","content":{"application/json":{"schema":{"type":"object","properties":{"sample":{"type":"boolean","description":"Present and true while the response contains fictional sample data."},"notice":{"type":"string"},"query":{"type":"string"},"parsed":{"$ref":"#/components/schemas/ParsedSituation"},"filters":{"type":"object"},"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/RankedLoanOfficer"}},"canonical_url":{"type":"string","format":"uri"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"}}}}},"components":{"responses":{"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Provenance":{"type":"object","required":["source","verified_at"],"properties":{"source":{"type":"string","enum":["nmls","state_regulator","lender_site","claimed","vendor"]},"source_url":{"type":["string","null"],"format":"uri"},"verified_at":{"type":"string","format":"date"}}},"Specialty":{"type":"object","required":["slug","category","label","description","synonyms"],"properties":{"slug":{"type":"string"},"category":{"type":"string","enum":["property_type","loan_program","borrower_situation"]},"label":{"type":"string"},"description":{"type":"string"},"synonyms":{"type":"array","items":{"type":"string"}},"why_hard":{"type":"string"},"questions_to_ask":{"type":"array","items":{"type":"string"}},"canonical_url":{"type":"string","format":"uri"}}},"ParsedSituation":{"type":"object","properties":{"specialties":{"type":"array","items":{"type":"string"}},"state":{"type":["string","null"]},"city":{"type":["string","null"]},"language":{"type":["string","null"]},"unmatched_terms":{"type":"array","items":{"type":"string"}}}},"RankedLoanOfficer":{"type":"object","required":["rank","score","loan_officer","reasons","canonical_url"],"properties":{"rank":{"type":"integer"},"score":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"},"description":"Why this person is in the list, with source and verification date."},"canonical_url":{"type":"string","format":"uri"},"loan_officer":{"$ref":"#/components/schemas/LoanOfficerSummary"}}},"LoanOfficerSummary":{"type":"object","properties":{"nmls_id":{"type":"integer"},"slug":{"type":"string"},"full_name":{"type":"string"},"canonical_url":{"type":"string","format":"uri"},"json_url":{"type":"string","format":"uri"},"lender":{"type":["object","null"],"properties":{"nmls_id":{"type":"integer"},"name":{"type":"string"},"canonical_url":{"type":"string"}}},"branch":{"type":["object","null"],"properties":{"city":{"type":["string","null"]},"state":{"type":["string","null"]}}},"licensed_states":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"specialties":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"evidence":{"type":"string"}}}},"years_licensed":{"type":["integer","null"]},"phone_office":{"type":["string","null"]},"email":{"type":["string","null"]},"lender_profile_url":{"type":["string","null"]}}},"LoanOfficer":{"type":"object","required":["nmls_id","slug","canonical_url","full_name"],"properties":{"sample":{"type":"boolean"},"nmls_id":{"type":"integer"},"slug":{"type":"string"},"canonical_url":{"type":"string","format":"uri"},"md_url":{"type":"string","format":"uri"},"json_url":{"type":"string","format":"uri"},"nmls_consumer_access_url":{"type":"string","format":"uri"},"full_name":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},"first_name":{"type":"string"},"last_name":{"type":"string"},"headshot_url":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},{"type":"null"}]},"bio":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},{"type":"null"}]},"title":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},{"type":"null"}]},"languages":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"array","items":{"type":"string"}}}}]},"years_licensed":{"type":["integer","null"]},"status":{"type":"string","enum":["active","inactive","unknown"]},"claimed":{"type":"boolean"},"claimed_at":{"type":["string","null"],"format":"date-time"},"profile_completeness":{"type":"integer","minimum":0,"maximum":100},"current_employment":{"oneOf":[{"$ref":"#/components/schemas/Employment"},{"type":"null"}]},"employment_history":{"type":"array","items":{"$ref":"#/components/schemas/Employment"}},"licenses":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":[],"properties":{"state":{"type":"string"},"license_type":{"type":"string","enum":["state_license","federal_registration"]},"license_number":{"type":["string","null"]},"status":{"type":"string"},"issued_at":{"type":["string","null"],"format":"date"}}}]}},"specialties":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":[],"properties":{"slug":{"type":"string"},"label":{"type":"string"},"evidence":{"type":"string","enum":["self_claimed","lender_page_text","production_data"]},"confidence":{"type":"number","minimum":0,"maximum":1},"evidence_snippet":{"type":["string","null"]}}}]}},"contacts":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":[],"properties":{"kind":{"type":"string","enum":["phone_office","email","website","linkedin_url","application_url"]},"value":{"type":"string"}}}]}},"disciplinary_actions":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":[],"properties":{"regulator":{"type":"string"},"action_type":{"type":"string"},"date":{"type":"string","format":"date"},"summary":{"type":"string"},"document_url":{"type":["string","null"]}}}]}},"last_verified_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date-time"}}},"Employment":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":[],"properties":{"lender_nmls_id":{"type":"integer"},"lender_name":{"type":"string"},"lender_slug":{"type":"string"},"branch_city":{"type":["string","null"]},"branch_state":{"type":["string","null"]},"branch_zip":{"type":["string","null"]},"start_date":{"type":["string","null"],"format":"date"},"end_date":{"type":["string","null"],"format":"date","description":"null means current"},"lender_profile_url":{"type":["string","null"]}}}]},"Lender":{"type":"object","properties":{"sample":{"type":"boolean"},"nmls_id":{"type":"integer"},"slug":{"type":"string"},"canonical_url":{"type":"string","format":"uri"},"nmls_consumer_access_url":{"type":"string","format":"uri"},"name":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},"dba_names":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["bank","credit_union","imb","broker","other"]},"website":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}]},{"type":"null"}]},"lo_directory_url":{"type":["string","null"]},"hq_state":{"type":["string","null"]},"loan_programs":{"allOf":[{"$ref":"#/components/schemas/Provenance"},{"type":"object","required":["value"],"properties":{"value":{"type":"array","items":{"type":"string"}}}}]},"loan_officer_count":{"type":"integer"},"last_verified_at":{"type":"string","format":"date"}}}}}}