{
  "openapi": "3.0.1",
  "info": {
    "title": "Apartments Com Scraper",
    "description": "From 1$/1000 results. Scrape Apartments.com listings by city, filter, or direct URL. Extract rent, address, beds, baths, amenities, photos, virtual tours & coordinates. Residential proxy needed for full detail mode.",
    "version": "0.1",
    "x-build-id": "R9aBVwV9lIt5Ybfho"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadsbrary~apartments-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadsbrary-apartments-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/leadsbrary~apartments-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-leadsbrary-apartments-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/leadsbrary~apartments-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-leadsbrary-apartments-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Highest priority. Paste Apartments.com search URLs, map URLs with ?bb=..., filter URLs, pagination URLs, or property detail URLs. When provided, the actor uses these URLs first.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "City or area slugs. Examples: new-york-ny, Miami FL, toronto-on, Austin, TX. Ignored when you rely only on Start URLs.",
            "items": {
              "type": "string"
            }
          },
          "homeTypes": {
            "title": "Home types",
            "type": "array",
            "description": "Use: all, apartments, houses, condos, townhomes. all means no type prefix in the URL.",
            "items": {
              "type": "string"
            }
          },
          "bedrooms": {
            "title": "Bedrooms",
            "type": "array",
            "description": "Optional. Use studios, 1, 2, 3, 4, 5, min-2, min-3. Empty means any bedrooms.",
            "items": {
              "type": "string"
            }
          },
          "priceMin": {
            "title": "Minimum rent",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum monthly rent. Example: 2000. Used with priceMax to build /2000-to-3000/ or alone as /over-2000/."
          },
          "priceMax": {
            "title": "Maximum rent",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum monthly rent. Example: 3000 builds /under-3000/ when no minimum is set."
          },
          "petPolicy": {
            "title": "Pet policy",
            "type": "string",
            "description": "Optional. Use empty, pet-friendly, pet-friendly-dog, or pet-friendly-cat."
          },
          "amenities": {
            "title": "Amenities",
            "type": "array",
            "description": "Optional filter slugs. Examples: washer-dryer, parking, air-conditioning, furnished, utilities-included, pool, fitness-center, laundry-facilities.",
            "items": {
              "type": "string"
            }
          },
          "specialties": {
            "title": "Specialty housing",
            "type": "array",
            "description": "Optional filter slugs. Examples: student-housing, senior-housing, short-term, low-income, military-housing, corporate-housing.",
            "items": {
              "type": "string"
            }
          },
          "extraFilterSlugs": {
            "title": "Extra filter slugs",
            "type": "array",
            "description": "Advanced: raw URL segments to append. Example: controlled-access, elevator, recent-build. Use this for any Apartments.com filter not listed above.",
            "items": {
              "type": "string"
            }
          },
          "rawQueryString": {
            "title": "Raw query string",
            "type": "string",
            "description": "Optional raw query string to append to generated URLs, without the leading ?. Example: bb=_slx7yjq0H1g4mu2nD. For exact map URLs, Start URLs are safer."
          },
          "mapBoundingBoxToken": {
            "title": "Map bounding box token",
            "type": "string",
            "description": "Optional value for the Apartments.com bb parameter. Example: _slx7yjq0H1g4mu2nD. This is mainly for copied map searches."
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to save. Set 0 for no explicit limit."
          },
          "maxPages": {
            "title": "Maximum search result pages per search URL",
            "minimum": 1,
            "type": "integer",
            "description": "Search pages to visit per generated or provided search URL. Page 2 is normally /2/ in Apartments.com URLs."
          },
          "includeDetails": {
            "title": "Open listing detail pages",
            "type": "boolean",
            "description": "When enabled, the actor opens each property page and extracts richer data. Requires a residential proxy. Disable for faster card-only output (no proxy needed)."
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Extract image URLs from detail pages."
          },
          "includeVirtualTours": {
            "title": "Include virtual tours and videos",
            "type": "boolean",
            "description": "Extract virtual tour, video, Matterport, iframe, and similar links when visible on the detail page."
          },
          "saveHtml": {
            "title": "Save detail HTML snapshots",
            "type": "boolean",
            "description": "Stores raw detail page HTML in the key-value store for debugging. Off by default to save storage."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many browser pages to run in parallel. Keep low when not using proxies."
          },
          "requestHandlerTimeoutSecs": {
            "title": "Request timeout in seconds",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for each page handler."
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for blocked, timed out, or failed pages."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional post-filter. Listings are saved only when their extracted text matches these keywords. For native Apartments.com keyword searches, paste the exact site URL in Start URLs.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatchMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all",
              "phrase"
            ],
            "type": "string",
            "description": "any = at least one keyword must match. all = every keyword must match. phrase = exact phrase matching for each keyword."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default is no proxy. Enable Apify Proxy or add custom proxies only if the site blocks or throttles your run."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}