GoliathDevelopersGet an API key
Reference/Propertiesgenerated from the gateway manifest

runPropertyComparables

Comparable sales for a property.

POST/api/v1/callWRITEidempotent · 24 hruns as the key's owner
View as Markdown

Comparable sales for a property (its id from a property read), as the property page's Comps tab: each comp's facts, distance and price per square foot, and the medians with the subject's implied value. Optional criteria narrow it (every bound is required when sent). Spends nothing.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "runPropertyComparables",
    "variables": {
      "propertyId": "<propertyId>"
    }
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.properties.runPropertyComparables(
  {
    propertyId: '<propertyId>'
  },
  { idempotencyKey: crypto.randomUUID() },
)
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    operationId: 'runPropertyComparables',
    variables: {
      propertyId: '<propertyId>'
    }
  }),
})
const { data, errors } = await res.json()

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

propertyIdID!required
criteriaPropertyComparablesCriteriaInput
maxDistanceMilesFloat!required
maxSaleAgeMonthsInt!required
livingAreaMinInt!required
livingAreaMaxInt!required
yearBuiltMinInt!required
yearBuiltMaxInt!required
bedroomsMinInt!required
bedroomsMaxInt!required
bathroomsMinFloat!required
bathroomsMaxFloat!required
propertyTypes[String!]!required
includeActiveListingsBoolean
ownerTypeString

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "propertyMutation": {
      "runPropertyComparables": {
        "comparables": [
          {
            "propertyId": "<ID>",
            "address": {
              "line1": "…",
              "city": "…",
              "state": "…",
              "zip": "…"
            },
            "beds": 0,
            "baths": 0,
            "livingSquareFeet": 0,
            "yearBuilt": 0,
            "lastSoldDate": "2026-01-01T00:00:00.000Z",
            "lastSoldPrice": "…",
            "isOnMarketComp": true,
            "listPrice": 0,
            "distanceMiles": 0,
            "pricePerSquareFoot": 0
          }
        ],
        "analytics": {
          "compCount": 0,
          "medianLastSoldPrice": 0,
          "medianPricePerSquareFoot": 0,
          "medianDistanceMiles": 0,
          "subjectImpliedValueFromMedianPricePerSquareFoot": 0
        },
        "generatedAt": "2026-01-01T00:00:00.000Z"
      }
    }
  }
}

Errors

Idempotency

Send an Idempotency-Key of 1 to 255 characters. A finished request retried with the same key replays its stored response, marked Idempotency-Replayed: true; one still in flight returns 409 idempotency_conflict. Keys expire after 24 hours. Write without fear →