# Public record history

Source: https://help.ruuster.com/idx/public-records-history

> Read the recorded deeds and mortgages of one property you looked up, for a CMA or a listing presentation, with your secret key and the Public Records add-on.

```http
GET https://idx.ruuster.com/v1/public-records/{recordId}/history
```

secret key only · 1 unit · never cached

Every recorded transfer and every recorded mortgage of one property, newest first. It is part of
the Public Records add-on, and it answers for a property you have looked up.

## What to know

- **Secret key only,** from your server. Your account needs the Public Records add-on.
- `recordId` is `record.recordId` from the
  [lookup](https://help.ruuster.com/idx/public-records-lookup). It works for 30 days after that
  lookup. A record id your account has not looked up answers 404 `not_found`, so ids cannot be
  guessed or walked.
- `purpose` is required: `cma` or `listing_presentation`.
- Each mortgage has a `status`: `open`, `released` (a release was recorded) or `paid_off` (a later
  sale or refinance paid it off). It is an estimate, because counties do not always record a payoff.
- `include=owner` adds buyer, seller and borrower names. Without it no name is returned.
- Only the states in your Public Records plan. A record in another state answers
  `mls_not_in_scope`, and one where Ruuster has no public records answers 422
  `location_not_supported`.
- `meta.notice` carries the public-records notice. This is not a title report. In a state where part
  of the record isn't public, it ends with that state's label, such as "No loan data".
- Every call is logged, and it counts against the same limit as a lookup.

## In the sandbox

A sandbox secret key answers this endpoint for a sample record id (`sbxrec_…`), with no add-on.

## Where it is used

- [Public records for CMAs and listing presentations](https://help.ruuster.com/idx/guide-public-records)
- [Public record lookup](https://help.ruuster.com/idx/public-records-lookup): find the record id.

## Path parameters

| Name | Type | Description |
|---|---|---|
| `recordId` | string | A sample public record's id (sbxrec_…), from /v1/sandbox/public-records/lookup. |

## Query parameters

| Name | Type | Description |
|---|---|---|
| `purpose` | enum | Required. Why you are pulling this one property: cma (preparing a comparative market analysis) or listing_presentation. Public records are for one property at a time, for one of these two uses. Values: `cma`, `listing_presentation`. |
| `include` | enum | owner adds buyer, seller and borrower names. Left out, no name is returned. Values: `owner`. |

## Response

The answer is `{ ok: true, data, meta }`. These are the fields of `data`; `meta` carries `brokerageId`, `freshness.asOf`, `mls` (each board's display rules) and `canonical`.

| Field | Type | Description |
|---|---|---|
| `recordId` | string | The record id: the county record's number (sbxrec_ and 16 hex characters with a sandbox key). Pass it to the history endpoint within 30 days of the lookup. |
| `purpose` | string (enum) | The purpose you sent. One of `cma`, `listing_presentation`. |
| `asOf` | string or null | The day the record was last updated (YYYY-MM-DD). |
| `transfers` | array of object | Every recorded transfer, newest first. |
| `transfers[].recordingDate` | string or null | The day the deed was recorded (YYYY-MM-DD). |
| `transfers[].contractDate` | string or null | The contract day (YYYY-MM-DD). |
| `transfers[].documentType` | string or null | The deed type. |
| `transfers[].price` | number or null | The sale price in dollars, or null for a transfer without one. |
| `transfers[].pricePerSqft` | number or null | The price per square foot, or null. |
| `transfers[].cashPurchase` | boolean or null | Whether the buyer paid cash. |
| `transfers[].intraFamily` | boolean or null | Whether it was a transfer within a family. |
| `transfers[].distressed` | boolean or null | Whether it was a distressed sale. |
| `transfers[].reo` | string or null | The bank-owned status, or null. |
| `transfers[].titleCompany` | string or null | The title company, or null. |
| `transfers[].documentNumber` | string or null | The recorder's document number, or null. |
| `transfers[].buyers` | object | The buyers (include=owner only). |
| `transfers[].buyers.names` | array of string | The buyers' names. |
| `transfers[].buyers.vesting` | string or null | How the buyers hold title, or null. |
| `transfers[].buyers.mailingAddress` | object or null | Where the party's mail goes, or null when the county doesn't record it. |
| `transfers[].buyers.mailingAddress.line1` | string or null | The street line. |
| `transfers[].buyers.mailingAddress.city` | string or null | The city. |
| `transfers[].buyers.mailingAddress.state` | string or null | The state code. |
| `transfers[].buyers.mailingAddress.postalCode` | string or null | The ZIP code. |
| `transfers[].sellers` | object | The sellers (include=owner only). |
| `transfers[].sellers.names` | array of string | The sellers' names. |
| `transfers[].sellers.mailingAddress` | object or null | Where the party's mail goes, or null when the county doesn't record it. |
| `transfers[].sellers.mailingAddress.line1` | string or null | The street line. |
| `transfers[].sellers.mailingAddress.city` | string or null | The city. |
| `transfers[].sellers.mailingAddress.state` | string or null | The state code. |
| `transfers[].sellers.mailingAddress.postalCode` | string or null | The ZIP code. |
| `mortgages` | array of object | Every recorded mortgage, newest first. |
| `mortgages[].recordingDate` | string or null | The day the loan was recorded (YYYY-MM-DD). |
| `mortgages[].amount` | number or null | The amount borrowed. |
| `mortgages[].purpose` | string or null | The loan purpose, for example Purchase or Refinance. |
| `mortgages[].type` | string or null | The loan type, for example Conventional, FHA or VA. |
| `mortgages[].rate` | number or null | The interest rate in percent, or null. |
| `mortgages[].termMonths` | integer or null | The term in months, or null. |
| `mortgages[].dueDate` | string or null | The maturity day (YYYY-MM-DD). |
| `mortgages[].heloc` | boolean | Whether it is a home equity line. |
| `mortgages[].purchaseMoney` | boolean or null | Whether the loan paid for the purchase. |
| `mortgages[].lender` | string or null | The lender. |
| `mortgages[].lenderType` | string or null | The lender type, or null. |
| `mortgages[].titleCompany` | string or null | The title company, or null. |
| `mortgages[].documentNumber` | string or null | The recorder's document number, or null. |
| `mortgages[].status` | string (enum) | open; released (a release was recorded); or paid_off (a later sale or refinance paid it off). An estimate. One of `open`, `released`, `paid_off`. |
| `mortgages[].closedBy` | string (enum) or null | What closed it, or null while open. One of `release`, `sale`, `refinance`. |
| `mortgages[].closedOn` | string or null | The day it closed, or null while open (YYYY-MM-DD). |
| `mortgages[].borrowers` | array of string | The borrowers' names (include=owner only). |

## Errors

These are the error codes this endpoint can answer. Every error has the same body; [Errors](https://help.ruuster.com/idx/reference-errors) explains each code and what to show.

`invalid_parameter`, `secret_key_in_url`, `invalid_credentials`, `missing_credentials`, `payment_required`, `access_revoked`, `addon_not_enabled`, `brokerage_not_enabled`, `secret_key_in_browser`, `secret_key_required`, `mls_not_in_scope`, `not_found`, `location_not_supported`, `sold_not_permitted`, `daily_quota_exceeded`, `rate_limited`, `internal_error`, `api_paused`, `source_unavailable`

## Example request

cURL:

```bash
curl -s -G "https://idx.ruuster.com/v1/public-records/900000001/history" \
  --data-urlencode purpose=cma \
  -H "Authorization: Bearer $IDX_SECRET_KEY"
```

TypeScript:

```typescript
import { createClient } from "@ruuster/idx";

const idx = createClient({ secretKey: process.env.IDX_SECRET_KEY });

const r = await idx.request("/public-records/900000001/history", {
  purpose: "cma",
});
if (!r.ok) throw new Error(`${r.error.code}: ${r.error.message}`);
console.log(r.data);
```

Python:

```python
import os

import requests

res = requests.get(
    "https://idx.ruuster.com/v1/public-records/900000001/history",
    params={
        "purpose": "cma",
    },
    headers={"Authorization": "Bearer " + os.environ["IDX_SECRET_KEY"]},
    timeout=30,
)
body = res.json()
if not body["ok"]:
    raise RuntimeError(body["error"]["code"] + ": " + body["error"]["message"])
print(body["data"])
```

PHP:

```php
<?php

$query = http_build_query([
    'purpose' => 'cma',
], '', '&', PHP_QUERY_RFC3986);
$ch = curl_init('https://idx.ruuster.com/v1/public-records/900000001/history' . '?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('IDX_SECRET_KEY')],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$body['ok']) {
    throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
```

## Example response

```json
{
  "ok": true,
  "data": {
    "recordId": "900000001",
    "purpose": "cma",
    "asOf": "2026-09-12",
    "transfers": [
      {
        "recordingDate": "2019-06-14",
        "contractDate": null,
        "documentType": "Warranty Deed",
        "price": 455000,
        "pricePerSqft": 183,
        "cashPurchase": false,
        "intraFamily": false,
        "distressed": false,
        "reo": null,
        "titleCompany": "Fixture Title Co",
        "documentNumber": "2019-0061422"
      },
      {
        "recordingDate": "2008-09-30",
        "contractDate": null,
        "documentType": "Warranty Deed",
        "price": 291000,
        "pricePerSqft": 117,
        "cashPurchase": true,
        "intraFamily": false,
        "distressed": false,
        "reo": null,
        "titleCompany": null,
        "documentNumber": "2008-0098811"
      }
    ],
    "mortgages": [
      {
        "recordingDate": "2019-06-14",
        "amount": 364000,
        "purpose": "Purchase",
        "type": "Conventional",
        "rate": 3.875,
        "termMonths": 360,
        "dueDate": "2049-07-01",
        "heloc": false,
        "purchaseMoney": true,
        "lender": "Fixture Bank NA",
        "lenderType": "Bank",
        "titleCompany": "Fixture Title Co",
        "documentNumber": "2019-0061423",
        "status": "open",
        "closedBy": null,
        "closedOn": null
      }
    ]
  },
  "meta": {
    "brokerageId": "bbbbbbbb-0000-4000-8000-000000000001",
    "freshness": {
      "asOf": "2026-10-22T15:00:00.000Z"
    },
    "mls": [],
    "canonical": null,
    "notice": "From county public records, which run about two months behind recording. Not a title, vesting or encumbrance report; mortgage status is estimated from recorded releases, later sales and refinances. Owner details may not be used to contact anyone who has asked not to be solicited. Use it for one property at a time, to prepare a CMA or a listing presentation; do not store, resell or redistribute it.",
    "audience": "display"
  }
}
```
