Skip to main content
GET
Count one lender's loans per hex cell for a map
Early access: while the developer tier is in beta, the API serves this route to Investorlift’s team and trusted partners. Investorlift will restrict the route further before it opens to every key.
Every H3 hexagon the lender lent in over the window, as lender cells. Each cell carries the loans, the volume, the purchase-money and investor counts, and the loans the lender took back. The API keys the list by the cell index and sorts it in cell order.

Use it when

The lender card’s map at any zoom above the neighbourhood, the way GET /v1/deals/cells draws the deals. A lender with tens of thousands of loans has far too many to draw one by one. At neighbourhood zoom, list the loans in view with GET /v1/lenders/{id}/loans and cell= (one cell’s rows) or a geometry. Then draw them from their parcels.

Read the response

  • One row per cell the lender lent in. A cell with no loan of the lender in the period is absent, never zero. cell is the H3 index as hex, the same string GET /v1/deals/cells uses. Any H3 library turns it into an outline. The cell is the parcel’s, so a loan sits in exactly one cell at each resolution.
  • period is 24m (the default), 12m or all. The API does not serve a year or a month at the cell grain. If you ask for one, the API answers 400 validation_error, code period_not_served.
  • product narrows n alone. With product=HELOC, CONSTRUCTION or OTHER (or several), n becomes the sum of the named products’ counts in the cell. volume, n_purchase_money, n_investor and n_foreclosed stay the whole cell’s, because the cell carries no per-product sum for them. The field descriptions say so.
  • n_foreclosed counts the cell’s instruments of the lender that a take-back deed followed. A take-back deed is a trustee’s deed, a sheriff’s deed or a deed in lieu on the parcel. The API counts it only when it comes after the recording and before any resale or later mortgage. The reading is the same as foreclosed on the loan row. It is 0 on a registry that measured none. Where no cell rankings exist at all, the row is absent.
  • Pagination is keyset on cell. The page size lets a metro-wide lender come back in one or two pages. The API caches the answer per query for the dataset version. If the lender is in more than one loaded market, you must send market=. 400 market_required says so.

Gotchas

  • Cells carry no ids and no addresses. For those, list the loans with cell=<index>.
  • A cell is the parcel’s hexagon, not a clip of a radius. An edge cell counts every loan of the lender in it. The list and the loans route resolve a geometry to the same cells, so their edge is a hex boundary too.
  • n_purchase_money and n_investor read the deed link. Where the market has no deed link, they are null (purchase_measured false on the profile).
  • Every row is dated (meta.dated[]). The as_of is the slice date in meta.coverage[].lenders.as_of. With require_current=true, the API answers 422 dated_refused.
  • A registry built before the place rankings answers 422 lenders_unavailable and names the route. A market with no published registry answers the same. The API answers 400 invalid_id for an id without the len_ prefix, and 404 for an unknown id. It answers 400 invalid_cursor for a cursor from another query or an older dataset.
  • The route follows old ids as the profile route does (since 0.17.0). For a merged id, the API answers 200 with meta.resolved_from and the current lender’s cells. For a retired id, it answers 410 gone. For an id it never issued, it answers 404. See Retired ids.
  • Not priced: the route costs no credits. Not a tool over MCP, as GET /v1/deals/cells is not.
Rank one lender by place with group_by=cell adds each cell’s rank and share among every lender there. Draw the map is the deals’ version of this page.

Authorizations

Authorization
string
header
required

API key from the developer console (starts with zpka_). Create one at https://developers.investorlift.com/get-a-key.

Path Parameters

id
string
required

Lender id, len_ followed by 12 hex characters, for example len_d2028f0766fc. Take it from a search hit, a ranking row's lender.id or a parcel's financing block. The id is the same in every market and stable across data refreshes. The API follows an id from an earlier registry run to the current lender, and meta.resolved_from lists it. For a retired id with no successor, the API answers 410 gone.

Query Parameters

market
string

Market code, for example phx. The loaded markets are in meta.coverage[]. Send it only when the id exists in more than one loaded market. 400 market_required says so, and a lender has the same id in every market it lent in. Otherwise the API uses the id's own market.

Required string length: 1 - 16
res
enum<string>
default:8

H3 cell resolution: 8 or 7. Resolution 8 (the default) has cells of about 0.3 square miles, a city or county view. Resolution 7 has cells of about 2 square miles, the whole metro.

Available options:
7,
8
period
string
default:24m

The window the cells cover: 24m (the default), 12m or all. A cell layer carries the three windows alone. For a calendar year or month, the API answers 400 validation_error, code period_not_served.

Pattern: ^(12m|24m|all|\d{4}|\d{4}-(0[1-9]|1[0-2]))$
product
enum<string>[]

Count only instruments of these products (comma list or repeated key): CONSTRUCTION, HELOC, OTHER. The cell's n is the sum of the named counts, and the API leaves out a cell with none of them. The fields volume, n_purchase_money, n_investor and n_foreclosed stay the cell's whole counts.

Minimum array length: 1

What the file says the loan is, read from its flags and loan type and never from the label. CONSTRUCTION: the construction flag or a "Building or Construction Loan" type. HELOC: the credit-line flag or a "Credit Line (Revolving)" type. OTHER: everything else, that is a purchase-money or refinance mortgage of any kind.

Available options:
CONSTRUCTION,
HELOC,
OTHER
limit
integer
default:5000

Page size, 1-5000 (default 5000).

Required range: 1 <= x <= 5000
cursor
string

Opaque cursor from page.next_cursor of the previous page. A change of query, sort, weights or data version invalidates it (400 invalid_cursor). Then restart from page 1.

Required string length: 1 - 4096
require_current
enum<string>
default:false

true refuses the request with 422 dated_refused while the registry's source, the financing slice, is a dated snapshot. The default false serves it, and meta.dated[] carries the lenders and financing blocks.

Available options:
true,
false

Response

The lender's H3 cells over the window, in cell-id order, one page.

The lender's H3 cells over the window, in cell-id order, one page.

data
object[]
required

The rows of this page.

page
object
required

Pagination: the page size, the rows returned and the cursor for the next page. Paged lists carry no total. The summary block does.

meta
object
required

Response metadata: when the API produced it, which markets it covers, and how fresh they are.