{
  "openapi": "3.0.1",
  "info": {
    "title": "Anjuke Scraper | Rental Listings, Prices and Agents",
    "description": "Anjuke scraper (安居客, 安居客租房) for China rental listings: 50 listings in 9 seconds, 51 fields each. Get monthly rent, layout, size, floor, amenities, photos, agent and agency, community and GPS coordinates. Search a city, district or metro line, or paste Anjuke links and listing IDs. No login needed.",
    "version": "1.0",
    "x-build-id": "wiTqOtnrvMUa7ua2b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~anjuke-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-anjuke-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/silentflow~anjuke-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-anjuke-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/silentflow~anjuke-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-anjuke-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": {
          "city": {
            "title": "🏙️ City",
            "type": "string",
            "description": "The Chinese city to search (城市). Type its Chinese name (<code>北京</code>, <code>上海</code>), its pinyin (<code>beijing</code>) or the short name in Anjuke addresses (<code>bj</code>). 645 cities are covered, from tier-1 cities to county towns.<br><br>A big city has hundreds of thousands of rentals: add <b>Keywords</b> or filters to reach the ones you want.",
            "default": "北京"
          },
          "keywords": {
            "title": "🔎 Keywords",
            "type": "array",
            "description": "Districts, business areas, communities or metro lines inside the city, one search each: <code>海淀</code>, <code>望京</code>, <code>天通苑</code>, <code>10号线</code>. Leave empty to search the whole city.<br><br>A district returns tens of thousands of listings, a community a few dozen to a few hundred.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Anjuke links",
            "type": "array",
            "description": "Anjuke rental links, from the website or the mobile site:<br>• a listing: <code>https://bj.zu.anjuke.com/fangyuan/4759706656564239/</code> or <code>https://m.anjuke.com/bj/rent/4759706656564239-3/</code><br>• a city's rentals: <code>https://m.anjuke.com/sh/rent/</code>, with its rent band and bedrooms when the link has them<br><br>Links and IDs replace the city search; add Keywords to search as well.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingIds": {
            "title": "🆔 Listing IDs",
            "type": "array",
            "description": "Anjuke listing IDs, the number in a listing's address: <code>4759706656564239</code>. Each ID returns that listing with every field, whatever its city. A listing taken down since is reported in the log and skipped.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "type": "integer",
            "description": "The run stops after this many listings, shared evenly between your searches. One search goes up to about 1,700 distinct listings deep (1,746 for the whole of Beijing in our test); for more, split it with Keywords (one district each) or rent bands.",
            "default": 100
          },
          "rentalType": {
            "title": "🏠 Rental type",
            "enum": [
              "any",
              "whole",
              "shared"
            ],
            "type": "string",
            "description": "Whole flat (整租) or a room in a shared flat (合租).",
            "default": "any"
          },
          "listedBy": {
            "title": "👤 Listed by",
            "enum": [
              "any",
              "owner",
              "agent"
            ],
            "type": "string",
            "description": "Who puts the rental online (房源来源): a private owner renting directly, without an agency, or an agent. Beijing has about 4,400 owner listings, Shanghai and Guangzhou close to 3,000 each, Shenzhen about 1,400.",
            "default": "any"
          },
          "minPrice": {
            "title": "💴 Min rent (¥/month)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest monthly rent in yuan, e.g. <code>3000</code>. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "💴 Max rent (¥/month)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest monthly rent in yuan, e.g. <code>8000</code>. Leave empty for no maximum."
          },
          "bedrooms": {
            "title": "🛏️ Bedrooms",
            "type": "array",
            "description": "Number of bedrooms (户型). Pick one or more.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 bedroom (一室)",
                "2 bedrooms (两室)",
                "3 bedrooms (三室)",
                "4 bedrooms (四室)",
                "5 or more (五室以上)"
              ]
            }
          },
          "propertyType": {
            "title": "🏢 Property type",
            "type": "array",
            "description": "Kind of building (房屋类型). Pick one or more. Old public housing and lane houses are found in Shanghai.<br><br>Owner listings do not give a property type on Anjuke: with this filter, keep <b>Listed by</b> on Any or Agent.",
            "items": {
              "type": "string",
              "enum": [
                "residential",
                "apartment",
                "villa",
                "hotelApartment",
                "mixedUse",
                "singleStory",
                "siheyuan",
                "oldPublic",
                "newStyleLane",
                "other"
              ],
              "enumTitles": [
                "Residential (普通住宅)",
                "Apartment (公寓)",
                "Villa (别墅)",
                "Serviced apartment (酒店公寓)",
                "Commercial and residential (商住两用)",
                "Single-storey house (平房)",
                "Courtyard house (四合院)",
                "Old public housing (老公房)",
                "Lane house (新里洋房)",
                "Other (其他)"
              ]
            }
          },
          "orientation": {
            "title": "🧭 Orientation",
            "type": "array",
            "description": "Which way the flat faces (朝向). South-facing flats get the most light. Pick one or more.",
            "items": {
              "type": "string",
              "enum": [
                "south",
                "north",
                "southNorth",
                "eastWest"
              ],
              "enumTitles": [
                "South (朝南)",
                "North (朝北)",
                "South and north, through (南北通透)",
                "East and west (东西)"
              ]
            }
          },
          "fitment": {
            "title": "🛋️ Decoration",
            "type": "array",
            "description": "How the flat is finished (装修). Pick one or more. Most Beijing rentals are well decorated (精装修); luxury flats number about 11,000 there and unfinished ones only a handful.",
            "items": {
              "type": "string",
              "enum": [
                "rough",
                "simple",
                "good",
                "luxury"
              ],
              "enumTitles": [
                "Unfinished (毛坯)",
                "Simple decoration (简单装修)",
                "Well decorated (精装修)",
                "Luxury (豪华装修)"
              ]
            }
          },
          "features": {
            "title": "✨ Features",
            "type": "array",
            "description": "Listing features (特色). A listing must have every feature you pick: <code>elevator</code> and <code>nearSubway</code> together return flats with a lift near a metro station.",
            "items": {
              "type": "string",
              "enum": [
                "elevator",
                "nearSubway",
                "video",
                "verified"
              ],
              "enumTitles": [
                "Elevator (有电梯)",
                "Near the metro (近地铁)",
                "Video tour (视频房源)",
                "Anjuke-checked listing (安选)"
              ]
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}