# Get Rent Estimate — RentCast

> Get a property rent estimate and comparable properties. See the documentation

- Key: `rentcast-get-rent-estimate`
- Type: Action (Read-only)
- Version: 0.0.2
- App: RentCast (`rentcast`) — https://pipedream.com/apps/rentcast.md
- This page (HTML): https://pipedream.com/apps/rentcast/actions/get-rent-estimate
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/rentcast/actions/get-rent-estimate/get-rent-estimate.mjs

## Description

Get a property rent estimate and comparable properties. [See the documentation](https://developers.rentcast.io/reference/rent-estimate-long-term)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `address` | `string` | No | The full address of the property, in the format of Street, City, State, Zip, e.g. 5500 Grand Lake Drive, San Antonio, TX, 78244 |
| `latitude` | `string` | No | The latitude of the property, e.g. 29.475962 |
| `longitude` | `string` | No | The longitude of the property, e.g. -98.351442 |
| `propertyType` | `string` | No | The type of the property. See the documentation for more information |
| `bedrooms` | `integer` | No | The number of bedrooms in the property. Use 0 to indicate a studio layout |
| `bathrooms` | `string` | No | The number of bathrooms in the property. Supports fractions to indicate partial bathrooms |
| `squareFootage` | `string` | No | The total living area size of the property, in square feet |
| `maxRadius` | `string` | No | The maximum distance between comparable listings and the subject property, in miles |
| `daysOld` | `integer` | No | The maximum number of days since comparable listings were last seen on the market, with a minimum of 1 |
| `compCount` | `integer` | No | The number of comparable listings to use when calculating the value estimate, between 5 and 25. Defaults to 15 if not provided |

## 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": "rentcast",
      },
    },
  },
)

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: "rentcast-get-rent-estimate",
  arguments: {
    address: "Address",
    latitude: "Latitude",
  },
})
```

**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: "rentcast-get-rent-estimate",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    rentcast: { authProvisionId: "apn_xxxxxxx" },
    address: "Address",
    latitude: "Latitude",
  },
})

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": "rentcast-get-rent-estimate",
    "configured_props": {
      "rentcast": { "authProvisionId": "apn_xxxxxxx" },
      "address": "Address",
      "latitude": "Latitude"
    }
  }'
```

---

- App: https://pipedream.com/apps/rentcast.md · All apps: https://pipedream.com/apps
