Model MatchHelp

Lenders

Count lenders matching filters

postapi.modelmatch.com/v1/lenders/count

Return the exact number of lenders matching the given filters. Accepts the same request body as listLenders (pagination and sort are ignored). Use this when you only need a total; to get the matching lenders themselves, send the same request body to listLenders.

Authorization

x-api-keystringrequired

API key or OAuth token. See Authentication.

Body application/json

advancedFiltersone of
Show child attributes
Option 1object
Show child attributes
childrenone of[]required

Array of filter expressions (AND)

Same shape as its parent.

typeenumrequired
Options:and
Option 2object
Show child attributes
childrenone of[]required

Array of filter expressions (OR)

Same shape as its parent.

typeenumrequired
Options:or
Option 3object
Show child attributes
childone ofrequired

Same shape as its parent.

typeenumrequired
Options:not
Option 4object
Show child attributes
fieldstringrequired
openumrequired

Comparison operator. exists means the field has a REAL value: on fields whose source records an unknown as an in-domain value (e.g. beds, squareFeet, lotSquareFeet, where an unrecorded measurement is stored as 0), those docs count as NOT existing. neq keeps docs with no value — it removes only what is known to equal the value, matching the reading of an exclusion.

Options:eqneqgtgteltltebetweeninmatchgeoDistanceexists
typeenumrequired
Options:filter
valuenull

Comparison value

filtersone of
Show child attributes
Option 1object
Show child attributes
childrenone of[]required

Array of filter expressions (AND)

Same shape as its parent.

typeenumrequired
Options:and
Option 2object
Show child attributes
childrenone of[]required

Array of filter expressions (OR)

Same shape as its parent.

typeenumrequired
Options:or
Option 3object
Show child attributes
childone ofrequired

Same shape as its parent.

typeenumrequired
Options:not
Option 4object
Show child attributes
fieldstringrequired
openumrequired

Comparison operator. exists means the field has a REAL value: on fields whose source records an unknown as an in-domain value (e.g. beds, squareFeet, lotSquareFeet, where an unrecorded measurement is stored as 0), those docs count as NOT existing. neq keeps docs with no value — it removes only what is known to equal the value, matching the reading of an exclusion.

Options:eqneqgtgteltltebetweeninmatchgeoDistanceexists
typeenumrequired
Options:filter
valuenull

Comparison value

flatFiltersobject
Show child attributes
modeenum
Options:andor
nameone of | null
Show child attributes
Option 1string
Option 2string[]

Match any value

Option 3object

Fuzzy text match

Show child attributes
matchstringrequired
totalDocumentsone of | null
Show child attributes
Option 1number
Option 2number[]

Match any value

Option 3object

Numeric range. Excludes null/missing-field docs by default; add includeNulls: true to keep them.

Show child attributes
gtnumber
gtenumber
includeNullsboolean

Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.

ltnumber
ltenumber
paginationobject
Show child attributes
cursorstring

Opaque cursor from previous response for next page

sizeinteger

Page size (1-100, default 25)

sortobject[]
Show child attributes
fieldenumrequired
Options:nametotalDocuments
orderenum
Options:ascdesc

Responses

200objectExact count of matching lenders
Show attributes
lenderNormalizationsobject[]

How each lenderName value resolved against the lender dictionary. Present when a lenderName filter was supplied.

Show child attributes
aliasCountintegerrequired

Stored lender-name variants this id expands to

displayNamestring | nullrequired
idstring | nullrequired

Canonical lender-dictionary id, or null

matchedViaenumrequired

id = the value already WAS a canonical key; alias = a stored lender name; name = matched the display/canonical name; unresolved = fell back to raw text match; degraded = the dictionary could not be consulted.

Options:idaliasnameunresolveddegraded
originalstringrequired

The value the caller sent

totalDocumentsintegerrequired

Loans the dictionary attributes to this id. A small number next to a well-known lender name means the name matched a minor entry.

locationNormalizationsobject[]

How each location filter value resolved. Present when a city/county/state/zip filter was supplied.

Show child attributes
candidatesstring[]

Location ids matching an ambiguous name, ranked. Use instantSearch or suggestLocations to pick one.

confidenceenumrequired

"exact" — matched a dictionary entry as written. "normalized" — resolved to a different spelling or merged several candidates. "fallback" — NOT resolved; the raw value was passed through, so a zero result means the name was not recognized rather than empty.

Options:exactnormalizedfallback
displayNamestringrequired
fieldstringrequired

The filter key this applies to

idstring

Resolved location id — pass this back for an exact filter

normalizedstringrequired
originalstringrequired
variantsstring[]

Spellings actually queried against the index

totalintegerrequired

Exact count of records matching the filters

400objectValidation error
401objectUnauthorized
403objectForbidden (authenticated, but missing required context — e.g. no active organization)
404objectNot found
413objectResponse payload too large — detail endpoint capped to fit Lambda response limits
503objectSearch timed out or the cluster is overloaded — retry after `Retry-After` seconds.