{
  "openapi": "3.0.1",
  "info": {
    "title": "Apartments.com Property Scraper",
    "description": "Scrape Apartments.com rentals. 10 endpoints:\n• Property record by listingKey, URL, or street address (auto-detected)\n• 6 search modes — location, ZIP, coords, polygon, region ID, or URL (auto-routed)\n• Location autocomplete\n\nOne row per listing; full upstream JSON in the Raw column.",
    "version": "1.0",
    "x-build-id": "ceffPVbey5IOk4bfC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~apartments-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-apartments-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/one-api~apartments-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-apartments-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/one-api~apartments-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-apartments-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": {
          "property_inputs": {
            "title": "Property listingKey, Apartments.com URL, or street address (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and calls the right endpoint:\n• Plain token (e.g. `33fdtgf`) → `/details/byid`\n• `https://www.apartments.com/...` → `/details/byurl`\n• Anything with a space (street address) → `/details/byaddress`\n\nEach row = 1 property record (community description, address, rent/bed ranges, rating, phone, photo cover).",
            "items": {
              "type": "string"
            }
          },
          "search_inputs": {
            "title": "Search query (one per line)",
            "type": "array",
            "description": "Auto-detects each entry and routes to the right `/search/*` endpoint:\n• `https://www.apartments.com/...` → `/search/byurl`\n• 5-digit ZIP (e.g. `11201`) → `/search/byzip`\n• `lat,lng` or `lat,lng,radius` (e.g. `40.7128,-74.0060,2`) → `/search/bycoordinates`\n• `lng lat,lng lat,...` (≥4 vertices) → `/search/bypolygon`\n• `geographyId|boundingBox|geographyType` (`|`-delimited; `geographyId` from autocomplete) → `/search/byregionid`\n• Anything else (city / state / neighborhood) → `/search/bylocation`\n\nEach hit returns one row per listing. Filters below apply to every search call.",
            "items": {
              "type": "string"
            }
          },
          "autocomplete_inputs": {
            "title": "Autocomplete query (one per line)",
            "type": "array",
            "description": "Type-ahead lookup for cities, neighbourhoods, ZIPs. Useful for grabbing `geographyId` to feed into `Search by Region ID`.",
            "items": {
              "type": "string"
            }
          },
          "page": {
            "title": "Page number (search filters)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pagination for every `/search/*` call. Default 1.",
            "default": 1
          },
          "resultCount": {
            "title": "Results per page (search filters)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many listings each search call returns. Apartments.com caps around 50.",
            "default": 50
          },
          "priceRange": {
            "title": "Price range",
            "type": "string",
            "description": "Filter for every `/search/*`. Format: `min:1500,max:4000`, or just `min:1500` / `max:4000`.",
            "default": ""
          },
          "bedRange": {
            "title": "Bed range",
            "type": "string",
            "description": "Format: `min:1,max:3`. Studio = `0`.",
            "default": ""
          },
          "bathRange": {
            "title": "Bath range",
            "type": "string",
            "description": "Format: `min:1,max:2`.",
            "default": ""
          },
          "squareFeetRange": {
            "title": "Square feet range",
            "type": "string",
            "description": "Format: `min:500,max:1500`.",
            "default": ""
          },
          "propertyType": {
            "title": "Property type",
            "type": "string",
            "description": "One or more of `Apartment,Condo,House,Townhouse,Room` (comma-separated).",
            "default": ""
          },
          "petPolicy": {
            "title": "Pet policy",
            "enum": [
              "",
              "DogsOK",
              "CatsOK",
              "DogsOK,CatsOK"
            ],
            "type": "string",
            "description": "Filter: `DogsOK`, `CatsOK`, `DogsOK,CatsOK`, or empty.",
            "default": ""
          },
          "amenities": {
            "title": "Amenities",
            "type": "string",
            "description": "Comma-separated amenity slugs (e.g. `Pool,Gym,InUnitWasher`).",
            "default": ""
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "Default",
              "PriceLowToHigh",
              "PriceHighToLow",
              "Rating",
              "Newest"
            ],
            "type": "string",
            "description": "Result ordering.",
            "default": "Default"
          },
          "minRating": {
            "title": "Minimum rating",
            "type": "string",
            "description": "Filter listings with rating ≥ this number (1-5).",
            "default": ""
          },
          "radius": {
            "title": "Radius (miles, location & coord searches)",
            "type": "string",
            "description": "Used by `/search/bylocation` and `/search/bycoordinates` (when not specified inline).",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Free-text keyword filter passed to `/search/bylocation` and `/search/bycoordinates`.",
            "default": ""
          },
          "enrich_search_results": {
            "title": "Enrich search results with full property details",
            "type": "boolean",
            "description": "Off by default. Search results come from Apartments.com's list cards, which carry no description, schools, fees, amenities detail or photo gallery. Turn this on and every search hit is followed by a full property lookup so those columns are filled — at the cost of one extra API call per listing (50 results = 50 extra calls) and a slower run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}