> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Zillow search API

> Search homes for sale, for rent or sold. Call the Zillow search API and get JSON back in one request. 2 credits per call. Failed calls cost nothing.

Searches homes for sale, for rent or sold.

## Request

`location` is required.

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.zillow.search({ location: "Austin, TX", daysOnZillow: "30Days", hasPool: true });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.zillow.search(location="Austin, TX", days_on_zillow="30Days", has_pool=True)
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/zillow/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"location":"Austin, TX","daysOnZillow":"30Days","hasPool":true}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy zillow search "Austin, TX" --daysOnZillow 30Days --hasPool
  ```
</CodeGroup>

## Response

If successful, the response body contains the standard envelope. `data.results[]` contains the homes, each with its price, address, size and status.

The following example is a real response, truncated: each list shows one item and long strings are cut.

```json theme={null}
{
  "success": true,
  "data": {
    "results": [
      {
        "propertyId": "29399286",
        "propertyUrl": "https://www.zillow.com/homedetails/106-W-32nd-St-Austin-TX-78705/29399286_zpid/",
        "status": "forSale",
        "statusText": "Active",
        "price": 2200000,
        "priceCurrency": "USD",
        "addressFull": "106 W 32nd St, Austin, TX 78705",
        "addressStreet": "106 W 32nd St",
        "addressCity": "Austin",
        "addressRegion": "TX",
        "addressPostalCode": "78705",
        "latitude": 30.297354,
        "longitude": -97.736565,
        "bedrooms": 4,
        "bathrooms": 3,
        "sqft": 2911,
        "homeType": "SINGLE_FAMILY",
        "daysOnZillow": 2,
        "brokerName": "Kuper Sotheby's Int'l Realty",
        "imageUrl": "https://photos.zillowstatic.com/fp/53de2e39052ef79395ed54f9e73dfded-p_e.jpg"
      }
    ],
    "total": 151,
    "page": 1,
    "totalPages": 4
  },
  "creditsUsed": 2,
  "requestId": "2fe9dbad-fc48-4890-9751-0b24b596035b"
}
```

| Field | Type | Description |
| - | - | - |
| `price` | number | Asking price, monthly rent, or the sale price of a sold home. Omitted when Zillow shows none, such as for sold homes in states that keep sale prices private. |
| `page` | integer | The page number of this response. |
| `totalPages` | integer | The number of pages that match the request. |
| `total` | integer | The total number of matching results, across all pages. |
| `statusText` | string | The listing status label as displayed by Zillow, such as `Active`. |
| `daysOnZillow` | integer | The number of days since the home was listed. |

For every field, see the response schema on this page.

## Optional parameters

| Parameter | Type | Description |
| - | - | - |
| `status` | string | Homes for sale, for rent or sold. Acceptable values are `forSale`, `forRent` and `sold`. If unset, defaults to `forSale`. |
| `minPrice` | number | The minimum price. |
| `maxPrice` | number | The maximum price. |
| `minBedrooms` | integer | The minimum number of bedrooms. Must be between 0 and 20. |
| `maxBedrooms` | integer | The maximum number of bedrooms. Must be between 0 and 20. |
| `minBathrooms` | number | The minimum number of bathrooms. Must be between 0 and 20. |
| `minSqft` | integer | The minimum size, in square feet. |
| `maxSqft` | integer | The maximum size, in square feet. |
| `minLotSize` | integer | The minimum lot, in square feet. |
| `maxLotSize` | integer | The maximum lot, in square feet. |
| `minYearBuilt` | integer | Restricts results to homes built in or after this year. Must be between 1600 and 2100. |
| `maxYearBuilt` | integer | Restricts results to homes built in or before this year. Must be between 1600 and 2100. |
| `maxHoa` | number | The maximum monthly HOA fee, in USD. `0` means no HOA fee. |
| `minParkingSpots` | integer | Restricts results to homes with at least this many parking spots. Must be between 1 and 4. |
| `daysOnZillow` | string | Restricts results to homes listed in the last 1, 7, 14, 30 or 90 days, or 6, 12, 24 or 36 months. For sold homes, it means sold in that time. Acceptable values are `1Day`, `7Days`, `14Days`, `30Days`, `90Days`, `6Months`, `12Months`, `24Months` and `36Months`. |
| `hasPool` | boolean | Restricts results to homes with a pool. If unset, defaults to `false`. |
| `hasGarage` | boolean | Restricts results to homes with a garage. If unset, defaults to `false`. |
| `hasAirConditioning` | boolean | Restricts results to homes with air conditioning. If unset, defaults to `false`. |
| `isWaterfront` | boolean | Restricts results to waterfront homes. If unset, defaults to `false`. |
| `singleStory` | boolean | Restricts results to single-story homes. If unset, defaults to `false`. |
| `openHouse` | boolean | Restricts results to homes with an open house. If unset, defaults to `false`. |
| `priceReduced` | boolean | Restricts results to homes with a price cut. If unset, defaults to `false`. |
| `has3dTour` | boolean | Restricts results to homes with a 3D tour. If unset, defaults to `false`. |
| `petsAllowed` | boolean | Restricts results to places that allow pets. Rentals only: set `status` to `forRent`. If unset, defaults to `false`. |
| `homeTypes` | string\[] | Restricts results to these kinds of home. Acceptable values are `house`, `townhouse`, `multiFamily`, `condo`, `land`, `apartment` and `manufactured`. |
| `sort` | string | Specifies the order of the homes. Acceptable values are `relevance`, `newest`, `priceHigh`, `priceLow`, `bedrooms`, `bathrooms`, `squareFeet` and `lotSize`. If unset, defaults to `relevance`. |
| `keywords` | string | Words the listing must mention, such as "pool" or "fixer upper". |
| `page` | integer | The page to return. Pages are numbered from 1. Must be between 1 and 20. If unset, defaults to `1`. |

## Billing

Each successful request consumes 2 credits, regardless of the number of items returned. Requests that fail, or that return no items, are not billed.

## Pagination

Results are paginated. To retrieve the next page, increment `page`. An empty `data.results` indicates the last page. The maximum value of `page` is 20.

## Related methods

* [Zillow property](/api-reference/endpoint/zillow-property): Accepts `propertyUrl`. Returns a home's details, price and Zestimate.


## OpenAPI

````yaml api-reference/openapi.json POST /v1/zillow/search
openapi: 3.1.0
info:
  title: Stophy API
  version: '1'
  description: >-
    Every endpoint is a POST that takes its input as a JSON object body. Unknown
    fields are rejected with 400.


    Responses leave out empty values: null, empty strings, empty objects and
    empty nested lists are not sent.


    x-credits is what one call costs. Every call costs the same, whatever it
    returns, unless an operation's description says it costs per 10 results, or
    per second of audio. Then x-credits is the lowest price and x-credits-max
    the most one call can cost. Where an operation takes limit, send it to
    return fewer results and pay for fewer.


    When a response has a cursor, send it back unchanged with the same input to
    get the next page. When it has a page, send the next page number.
servers:
  - url: https://api.stophy.dev
security:
  - apiKey: []
paths:
  /v1/zillow/search:
    post:
      summary: Search homes for sale, for rent or sold
      description: Costs 2 credits per call. Pages with page.
      operationId: zillowSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                location:
                  type: string
                  minLength: 2
                  maxLength: 200
                status:
                  default: forSale
                  type: string
                  enum:
                    - forSale
                    - forRent
                    - sold
                minPrice:
                  type: number
                  minimum: 0
                maxPrice:
                  type: number
                  minimum: 0
                minBedrooms:
                  type: integer
                  minimum: 0
                  maximum: 20
                maxBedrooms:
                  type: integer
                  minimum: 0
                  maximum: 20
                minBathrooms:
                  type: number
                  minimum: 0
                  maximum: 20
                minSqft:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                maxSqft:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                minLotSize:
                  description: Zillow's own Lot size minimum, in square feet.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                maxLotSize:
                  description: Zillow's own Lot size maximum, in square feet.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                minYearBuilt:
                  description: Zillow's own Year built minimum.
                  type: integer
                  minimum: 1600
                  maximum: 2100
                maxYearBuilt:
                  description: Zillow's own Year built maximum.
                  type: integer
                  minimum: 1600
                  maximum: 2100
                maxHoa:
                  description: >-
                    Zillow's own Max HOA: the highest monthly HOA fee in USD. 0
                    means no HOA fee.
                  type: number
                  minimum: 0
                minParkingSpots:
                  description: >-
                    Zillow's own Parking spots filter: at least this many (1 to
                    4).
                  type: integer
                  minimum: 1
                  maximum: 4
                daysOnZillow:
                  description: >-
                    Zillow's own Days on Zillow filter: listed in the last 1, 7,
                    14, 30 or 90 days, or 6, 12, 24 or 36 months. For sold homes
                    it means sold in the last N.
                  type: string
                  enum:
                    - 1Day
                    - 7Days
                    - 14Days
                    - 30Days
                    - 90Days
                    - 6Months
                    - 12Months
                    - 24Months
                    - 36Months
                hasPool:
                  default: false
                  description: >-
                    Zillow's own "Must have pool" filter. Only matching homes
                    when true.
                  type: boolean
                hasGarage:
                  default: false
                  description: >-
                    Zillow's own "Must have garage" filter. Only matching homes
                    when true.
                  type: boolean
                hasAirConditioning:
                  default: false
                  description: >-
                    Zillow's own "Must have A/C" filter. Only matching homes
                    when true.
                  type: boolean
                isWaterfront:
                  default: false
                  description: >-
                    Zillow's own "Waterfront" filter. Only matching homes when
                    true.
                  type: boolean
                singleStory:
                  default: false
                  description: >-
                    Zillow's own "Single-story only" filter. Only matching homes
                    when true.
                  type: boolean
                openHouse:
                  default: false
                  description: >-
                    Zillow's own "Must have open house" filter. Only matching
                    homes when true.
                  type: boolean
                priceReduced:
                  default: false
                  description: >-
                    Zillow's own "Must have price reduction" filter. Only
                    matching homes when true.
                  type: boolean
                has3dTour:
                  default: false
                  description: >-
                    Zillow's own "Must have 3D Tour" filter. Only matching homes
                    when true.
                  type: boolean
                petsAllowed:
                  default: false
                  description: >-
                    Zillow's own "Pets Allowed" filter. Only matching homes when
                    true. Rentals only: needs status forRent.
                  type: boolean
                homeTypes:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                      - house
                      - townhouse
                      - multiFamily
                      - condo
                      - land
                      - apartment
                      - manufactured
                sort:
                  default: relevance
                  type: string
                  enum:
                    - relevance
                    - newest
                    - priceHigh
                    - priceLow
                    - bedrooms
                    - bathrooms
                    - squareFeet
                    - lotSize
                keywords:
                  description: >-
                    Words the listing must mention, like "pool" or "fixer
                    upper".
                  type: string
                  minLength: 1
                  maxLength: 200
                page:
                  default: 1
                  description: Page number, starting at 1.
                  type: integer
                  minimum: 1
                  maximum: 20
              required:
                - location
              additionalProperties: false
            example:
              location: Austin, TX
              daysOnZillow: 30Days
              hasPool: true
      responses:
        '200':
          description: The data, and the credits this call used.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            x-credits-used:
              $ref: '#/components/headers/CreditsUsed'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            x-cache:
              $ref: '#/components/headers/Cache'
            x-cache-age:
              $ref: '#/components/headers/CacheAge'
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                  - creditsUsed
                  - requestId
                properties:
                  success:
                    const: true
                  data:
                    type: object
                    additionalProperties: false
                    properties:
                      total:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      results:
                        type: array
                        items:
                          type: object
                          additionalProperties: false
                          properties:
                            propertyId:
                              type: string
                            propertyUrl:
                              type: string
                              format: uri
                            status:
                              type: string
                              enum:
                                - forSale
                                - forRent
                                - sold
                                - other
                            statusText:
                              type: string
                            price:
                              description: >-
                                Asking price, monthly rent, or the sale price of
                                a sold home. Null when Zillow shows none, which
                                includes sold homes in states that keep sale
                                prices private, such as Texas.
                              type: number
                              minimum: 0
                            priceCurrency:
                              type: string
                              const: USD
                            addressFull:
                              type: string
                            addressStreet:
                              type: string
                            addressCity:
                              type: string
                            addressRegion:
                              type: string
                            addressPostalCode:
                              type: string
                            latitude:
                              type: number
                              minimum: -90
                              maximum: 90
                            longitude:
                              type: number
                              minimum: -180
                              maximum: 180
                            bedrooms:
                              type: number
                            bathrooms:
                              type: number
                            sqft:
                              type: number
                            homeType:
                              type: string
                            daysOnZillow:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            lastSoldAt:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            zestimate:
                              type: number
                            rentZestimate:
                              type: number
                            brokerName:
                              type: string
                            imageUrl:
                              type: string
                              format: uri
                            buildingName:
                              type: string
                            buildingMinRent:
                              type: number
                            buildingMaxRent:
                              type: number
                            buildingAvailableUnits:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            units:
                              type: array
                              items:
                                type: object
                                additionalProperties: false
                                properties:
                                  bedrooms:
                                    type: number
                                  price:
                                    type: number
                                    minimum: 0
                                required: []
                          required:
                            - propertyUrl
                            - status
                      page:
                        type: integer
                        minimum: 1
                        maximum: 9007199254740991
                      totalPages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - results
                      - page
                  creditsUsed:
                    type: integer
                  requestId:
                    type: string
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  headers:
    RequestId:
      description: The request id. Quote it when you report a problem.
      schema:
        type: string
    CreditsUsed:
      description: Credits this call used.
      schema:
        type: integer
    RateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix time in seconds when the current window resets.
      schema:
        type: integer
    Cache:
      description: hit if this result came from the cache, miss if it was fetched live.
      schema:
        type: string
    CacheAge:
      description: Seconds since the returned result was written to the cache.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    Error:
      description: The request failed. retryable says whether trying again can help.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          const: false
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - requestId
          properties:
            code:
              type: string
              enum:
                - cliSessionCompleted
                - cliSessionExists
                - cliSessionNotFound
                - forbidden
                - insufficientCredits
                - internalError
                - inviteClaimed
                - inviteDisabled
                - inviteExpired
                - inviteUsedUp
                - invalidCliSession
                - invalidCliVerifier
                - invalidRequest
                - notFound
                - rateLimited
                - sourceChanged
                - sourceRefused
                - sourceTimeout
                - sourceUnavailable
                - tooManyInFlight
                - unauthorized
                - unsupportedMediaType
            message:
              type: string
            retryable:
              type: boolean
            retryAfterSeconds:
              type: integer
            requestId:
              type: string
            requiredCredits:
              type: number
            availableCredits:
              type: number
            billingUrl:
              type: string
              const: https://stophy.dev/billing
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.