# Get Listings — Bridge Interactive Platform

> Get MLS listings from a dataset. See the documentation

- Key: `bridge_interactive_platform-get-listings`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Bridge Interactive Platform (`bridge_interactive_platform`) — https://pipedream.com/apps/bridge-interactive-platform.md
- This page (HTML): https://pipedream.com/apps/bridge-interactive-platform/actions/get-listings
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/bridge_interactive_platform/actions/get-listings/get-listings.mjs

## Description

Get MLS listings from a dataset. [See the documentation](https://bridgedataoutput.com/docs/explorer/mls-data)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `dataset` | `string` | Yes | The dataset to use for the query |
| `near` | `string` | No | Coord or location eg. near=-73.98,40.73 or near=San Diego |
| `radius` | `string` | No | Search Radius in miles, km, or degrees (no units)s |
| `box` | `string` | No | Coordinates representing a box eg. box=-112.5,33.75,-123,39 |
| `poly` | `string` | No | Minimum 3 pairs of coordinates representing a polygon eg. poly=-112.5,33.75,-123,39,-120,38 |
| `geohash` | `string` | No | Alphanumeric geohash eg. geohash=ezs42 |
| `sortBy` | `string` | No | Response field to sort query by Options are loaded from the connected account. |
| `order` | `string` | No | Order of responses |
| `fields` | `string[]` | No | Filters Response fields Options are loaded from the connected account. |
| `limit` | `integer` | No | Maximum number of responses |
| `offset` | `integer` | No | Number of responses to skip |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "bridge_interactive_platform",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "bridge_interactive_platform-get-listings",
  arguments: {
    dataset: "Dataset",
    near: "Near",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "bridge_interactive_platform-get-listings",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bridge_interactive_platform: { authProvisionId: "apn_xxxxxxx" },
    dataset: "Dataset",
    near: "Near",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "bridge_interactive_platform-get-listings",
    "configured_props": {
      "bridge_interactive_platform": { "authProvisionId": "apn_xxxxxxx" },
      "dataset": "Dataset",
      "near": "Near"
    }
  }'
```

---

- App: https://pipedream.com/apps/bridge-interactive-platform.md · All apps: https://pipedream.com/apps
