---
title: "Search by Agent / Office"
method: GET
path: "/v1.0/listing"
tags: ["Listing"]
---

# Search by Agent / Office

`GET /v1.0/listing`

Searches active and sold listings for a specific agent (the caller by default), their office, or a set of MLS listing IDs.

Notes:
- limit must be in (0, 1000]; otherwise 400 LISTING_LIMIT_NOT_VALID.
- listingId and soldListingId cannot be supplied together; doing so returns an error envelope on HTTP 200.
- At least one of agentListings, officeListings, listingId, soldListingId, mlsListingIds, buildingName, or buildingAddress must identify the search target.
- When userId differs from the caller, caller must have MANAGE_TEAM_AGENT permission.

## Query parameters

- `userId` integer
- `listingId` string
- `nextPageKey` string
- `soldNextPageKey` string
- `mlsListingIds` string
- `street` string
- `limit` integer
- `soldListingId` string
- `officeListings` boolean
- `agentListings` boolean
- `buildingName` string
- `buildingAddress` string
- `showCondition` boolean

## Headers

- `Authorization` string, required

## Response `200`

Search result envelope with active listings, sold listings, and listing metadata.

- ListingSearchResponse — Response for GET /v1.0/listing. Carries active-listing results, sold-listing results, and pagination / total metadata.
  - `listIng` object — Active listings matching the search. Structure is a listing hub payload; fields depend on the listing source.
  - `soldListing` object — Sold listings matching the search. Same structure as listIng.
  - `get_listingMetadata` ListingMetaData — Listing search metadata: totals, pagination cursors, and filter echo.
    - `collection` string
    - `limit` integer
    - `total` integer
    - `activeTotal` integer
    - `soldTotal` integer
    - `nextPageKey` string
    - `soldNextPageKey` string

## Other responses

- `400` — Invalid parameters (LISTING_LIMIT_NOT_VALID or combination errors).
- `401` — Missing or invalid authentication token.
- `403` — Caller has no access to the specified userId's data (NO_ACCESS_WEBSITE).
- `404` — userId does not exist (USER_NOT_EXIST), or the alert-condition lookup failed (ALERT_CONDITION_FEGIN_FAIL).
- `500` — Internal server error.

---

[API](https://skmtc.net/lofty/apis/lofty-service-open-apis.md) · [All operations](https://skmtc.net/lofty/apis/lofty-service-open-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lofty/lofty-service-open-apis/revisions/23e640467118/schema)
