{
  "openapi": "3.0.1",
  "info": {
    "title": "RICS Firms Scraper",
    "description": "Scrape RICS' official Find a Surveyor directory (ricsfirms.com) - 40,000+ chartered surveying firms worldwide. Search by location, firm name, keyword, service, topic, or country, or fetch specific firms by office ID/URL.",
    "version": "1.0",
    "x-build-id": "AUh049JpGpXOelIPt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~rics-firms-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-rics-firms-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/crawlerbros~rics-firms-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-rics-firms-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/crawlerbros~rics-firms-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-rics-firms-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byOfficeIds"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "locationQuery": {
            "title": "Location (town, city, or postcode)",
            "type": "string",
            "description": "UK town/city/postcode or an international city name to search near (mode=search). Leave blank to browse the whole directory, optionally combined with Country."
          },
          "firmNameQuery": {
            "title": "Firm name contains",
            "type": "string",
            "description": "Filter to firms whose name matches this text (mode=search)."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text keyword matched against each firm's \"about us\" description and services (mode=search)."
          },
          "serviceName": {
            "title": "Surveying service",
            "enum": [
              "",
              "110",
              "108",
              "98",
              "79",
              "58",
              "68",
              "75",
              "122",
              "85",
              "94",
              "95",
              "97",
              "99",
              "6",
              "123",
              "115",
              "63",
              "27",
              "2",
              "54",
              "44",
              "124",
              "103",
              "90",
              "106",
              "30",
              "4",
              "113",
              "59",
              "82",
              "130",
              "5",
              "109",
              "61",
              "41",
              "119",
              "114",
              "71",
              "67",
              "96",
              "24",
              "34",
              "65",
              "14",
              "70",
              "120",
              "126",
              "16",
              "104",
              "47",
              "77",
              "86",
              "31",
              "49",
              "112",
              "93",
              "118",
              "117",
              "101",
              "32",
              "42",
              "127",
              "38",
              "91",
              "28",
              "80",
              "116",
              "18",
              "19",
              "60",
              "39",
              "84",
              "66",
              "92",
              "22",
              "10",
              "20",
              "8",
              "35",
              "29",
              "69",
              "107",
              "111",
              "102",
              "125",
              "56",
              "7",
              "25",
              "72",
              "81",
              "74",
              "21",
              "11",
              "26",
              "46",
              "105",
              "121",
              "36",
              "87",
              "128",
              "53",
              "88",
              "57",
              "89",
              "132",
              "33",
              "50",
              "12",
              "3",
              "78",
              "52",
              "15",
              "45",
              "17",
              "48",
              "73",
              "40",
              "23",
              "129",
              "76",
              "43",
              "13",
              "9",
              "37",
              "62",
              "83",
              "51",
              "100",
              "55",
              "64",
              "1"
            ],
            "type": "string",
            "description": "Restrict results to firms offering this specific surveying service (mode=search).",
            "default": ""
          },
          "topicName": {
            "title": "Topic / use-case",
            "enum": [
              "",
              "1211",
              "1189",
              "1214",
              "1081",
              "1180",
              "1068",
              "2511",
              "1156",
              "1229",
              "1207",
              "1230",
              "1198",
              "1190",
              "1185",
              "1192",
              "1195",
              "1181",
              "1231",
              "1186",
              "1197",
              "1072",
              "1201",
              "1191",
              "1151",
              "1208",
              "1206",
              "1146",
              "1073",
              "1196",
              "1133",
              "1209",
              "1071",
              "1200",
              "1188",
              "1213",
              "1184",
              "1205",
              "1080",
              "1202",
              "1212",
              "1182",
              "1067",
              "1199",
              "1215",
              "1210",
              "1187",
              "1179",
              "1194",
              "1193",
              "1183",
              "1204",
              "1226"
            ],
            "type": "string",
            "description": "Restrict results to firms relevant to this consumer topic, e.g. Buying, Party Walls, Extensions (mode=search).",
            "default": ""
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "",
              "DZ",
              "AO",
              "AI",
              "AG",
              "AR",
              "AU",
              "AT",
              "BS",
              "BH",
              "BB",
              "BE",
              "BM",
              "BO",
              "BA",
              "BW",
              "BR",
              "VG",
              "BG",
              "KH",
              "CA",
              "KY",
              "CN",
              "CO",
              "CR",
              "HR",
              "CY",
              "CZ",
              "DK",
              "DM",
              "DO",
              "EG",
              "EE",
              "FI",
              "FR",
              "GE",
              "DE",
              "GH",
              "GR",
              "GD",
              "GY",
              "HK",
              "HU",
              "IN",
              "IQ",
              "IE",
              "IL",
              "IT",
              "CI",
              "JM",
              "JP",
              "JO",
              "KE",
              "KW",
              "LV",
              "LB",
              "LT",
              "LU",
              "MO",
              "MK",
              "MY",
              "MV",
              "MU",
              "MX",
              "MC",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NL",
              "NZ",
              "NG",
              "OM",
              "PE",
              "PH",
              "PL",
              "PT",
              "QA",
              "RO",
              "RU",
              "RW",
              "SA",
              "RS",
              "SG",
              "SK",
              "SI",
              "ZA",
              "ES",
              "LK",
              "SE",
              "CH",
              "TW",
              "TH",
              "TT",
              "TR",
              "TC",
              "UG",
              "AE",
              "GB",
              "US",
              "UZ",
              "VN",
              "ZW"
            ],
            "type": "string",
            "description": "Restrict results to a specific country. Leave blank for the UK default directory, or combine with Location for a place inside that country (mode=search).",
            "default": ""
          },
          "includeFullProfile": {
            "title": "Include full firm profile",
            "type": "boolean",
            "description": "Fetch each firm's profile page for services offered, surveyor type, business type, partners/directors and RICS personnel (mode=search). Adds one extra request per firm; disable for faster/lighter runs.",
            "default": true
          },
          "ricsRegulatedOnly": {
            "title": "RICS-regulated firms only",
            "type": "boolean",
            "description": "Only keep firms flagged as RICS-regulated (mode=search).",
            "default": false
          },
          "residentialOnly": {
            "title": "Residential-property firms only",
            "type": "boolean",
            "description": "Only keep firms that target residential-property clients (mode=search).",
            "default": false
          },
          "commercialOnly": {
            "title": "Commercial-property firms only",
            "type": "boolean",
            "description": "Only keep firms that target commercial-property clients (mode=search).",
            "default": false
          },
          "freeAdviceOnly": {
            "title": "Firms offering free initial advice only",
            "type": "boolean",
            "description": "Only keep firms that offer free initial advice (mode=search).",
            "default": false
          },
          "officeIds": {
            "title": "Office IDs / profile URLs (mode=byOfficeIds)",
            "type": "array",
            "description": "RICS office numbers (e.g. `233706`) or full profile URLs (e.g. `https://www.ricsfirms.com/office/233706/Peter-Barry-Surveyors`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the number of firm records emitted.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}