{
  "openapi": "3.0.1",
  "info": {
    "title": "Apartments.com API & Scraper — US Rentals + Walk Score",
    "description": "🏢 The Apartments.com API + Apartments.com scraper for PropTech. Search US rentals by location, zip, coordinates, or URL. Built-in market-rent KPIs (median, $/bed, distribution) + walk score API, schools, pet policy in one event.",
    "version": "1.0",
    "x-build-id": "x1jdgli34IhPsemOD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~apartments-com-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-apartments-com-property-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/sian.agency~apartments-com-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-apartments-com-property-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/sian.agency~apartments-com-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-apartments-com-property-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "byLocation",
              "byZip",
              "byCoordinates",
              "byUrl",
              "bulkLocations"
            ],
            "type": "string",
            "description": "How to find rental listings.\n\n• **byLocation** — free-text city/neighborhood (e.g. \"Brooklyn, NY\")\n• **byZip** — 5-digit US zip code (e.g. \"10001\")\n• **byCoordinates** — lat/lng + radius (miles)\n• **byUrl** — paste any apartments.com region or city URL\n• **bulkLocations** — batch dozens of locations in one run (PAID)",
            "default": "byLocation"
          },
          "maxResults": {
            "title": "📊 Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on listings returned per query. Apartments.com returns 50 results per page; the actor auto-paginates up to this cap. FREE tier is always capped at 25 listings per run.",
            "default": 100
          },
          "location": {
            "title": "📍 Location  (used when Search Mode = byLocation)",
            "type": "string",
            "description": "Free-text US city or neighborhood. Examples:\n• \"Brooklyn, NY\"\n• \"Capitol Hill, Seattle\"\n• \"Austin, TX\"\n• \"Williamsburg\"\n\nThe API will fuzzy-match — your run summary will echo the matched location."
          },
          "zip": {
            "title": "📮 Zip Code  (used when Search Mode = byZip)",
            "type": "string",
            "description": "5-digit US zip code (e.g. \"10001\", \"78704\")."
          },
          "latitude": {
            "title": "🗺️ Latitude  (used when Search Mode = byCoordinates)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for a radial search."
          },
          "longitude": {
            "title": "🗺️ Longitude  (used when Search Mode = byCoordinates)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for a radial search."
          },
          "radius": {
            "title": "📏 Radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Search radius in miles around the lat/lng center (1-50).",
            "default": 5
          },
          "url": {
            "title": "🔗 Apartments.com URL  (used when Search Mode = byUrl)",
            "type": "string",
            "description": "Paste any apartments.com region, city, or neighborhood URL. Examples:\n• https://www.apartments.com/new-york-ny/\n• https://www.apartments.com/brooklyn-ny/\n• https://www.apartments.com/austin-tx/"
          },
          "locations": {
            "title": "📋 Bulk Locations  (PAID, bulkLocations mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of US location strings (one search per item). PAID tier only. Examples: [\"Brooklyn, NY\", \"Austin, TX\", \"Seattle, WA\"].",
            "items": {
              "type": "string"
            }
          },
          "includeEnrichment": {
            "title": "⭐ Include enrichment bundle (PAID)",
            "type": "boolean",
            "description": "When ON, fetches the full enrichment bundle for each listing in parallel: details (description + amenities + fees + lease terms + photos), info (year built, unit count, story count), walk/transit/bike scores, schools, pet policy, rental costs, and unit-level availabilities. 7 extra API calls per listing run in parallel. Adds one enrichment-fetched charge per listing where at least one enrichment fetch succeeded. Disabled on FREE tier.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}