{
  "openapi": "3.0.1",
  "info": {
    "title": "LA County Restaurant Inspection Scraper",
    "description": "Scrape restaurant and food-facility health inspection records for Los Angeles County, CA - facility name, address, placard grade, score, violations, and geolocation. Search by name, owner, city, facility ID, or location.",
    "version": "1.0",
    "x-build-id": "eAynG1ezBpBaja3X2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~la-county-restaurant-inspection-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-la-county-restaurant-inspection-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~la-county-restaurant-inspection-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-la-county-restaurant-inspection-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~la-county-restaurant-inspection-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-la-county-restaurant-inspection-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",
              "byOwner",
              "byCity",
              "byFacilityId",
              "nearby"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Restaurant / facility name (mode=search)",
            "type": "string",
            "description": "Free-text keyword matched against the facility name (case-insensitive, partial match).",
            "default": "pizza"
          },
          "ownerName": {
            "title": "Owner name (mode=byOwner)",
            "type": "string",
            "description": "Free-text keyword matched against the registered business owner name (case-insensitive, partial match).",
            "default": ""
          },
          "cities": {
            "title": "Cities (mode=byCity)",
            "type": "array",
            "description": "One or more LA County cities/unincorporated communities to browse. Also usable as an extra filter on other modes.",
            "items": {
              "type": "string",
              "enum": [
                "ACTON",
                "AGOURA HILLS",
                "AGUA DULCE",
                "ALHAMBRA",
                "ALTADENA",
                "ARCADIA",
                "ARLETA",
                "ARTESIA",
                "AVALON",
                "AZUSA",
                "BALDWIN HILLS",
                "BALDWIN PARK",
                "BELL",
                "BELL GARDENS",
                "BELLFLOWER",
                "BEVERLY HILLS",
                "BRADBURY",
                "BRENTWOOD",
                "BURBANK",
                "CALABASAS",
                "CANOGA PARK",
                "CANYON COUNTRY",
                "CARSON",
                "CASTAIC",
                "CENTURY CITY",
                "CERRITOS",
                "CHATSWORTH",
                "CITY OF INDUSTRY",
                "CLAREMONT",
                "COMMERCE",
                "COMPTON",
                "COVINA",
                "CUDAHY",
                "CULVER CITY",
                "DIAMOND BAR",
                "DOWNEY",
                "DUARTE",
                "EAGLE ROCK",
                "EAST LOS ANGELES",
                "EL MONTE",
                "EL SEGUNDO",
                "ENCINO",
                "GARDENA",
                "GLENDALE",
                "GLENDORA",
                "GORMAN",
                "GRANADA HILLS",
                "GREEN VALLEY",
                "HACIENDA HEIGHTS",
                "HARBOR CITY",
                "HAWAIIAN GARDENS",
                "HAWTHORNE",
                "HERMOSA BEACH",
                "HOLLYWOOD",
                "HUNTINGTON PARK",
                "INDUSTRY",
                "INGLEWOOD",
                "IRWINDALE",
                "LA CANADA FLINTRIDGE",
                "LA CRESCENTA",
                "LA HABRA HEIGHTS",
                "LA MIRADA",
                "LA PUENTE",
                "LA VERNE",
                "LAKE BALBOA",
                "LAKE HUGHES",
                "LAKE LOS ANGELES",
                "LAKE VIEW TERRACE",
                "LAKEWOOD",
                "LANCASTER",
                "LAWNDALE",
                "LEBEC",
                "LENNOX",
                "LEONA VALLEY",
                "LITTLEROCK",
                "LOMITA",
                "LONG BEACH",
                "LOS ANGELES",
                "LYNWOOD",
                "MALIBU",
                "MANHATTAN BEACH",
                "MARINA DEL REY",
                "MAYWOOD",
                "MISSION HILLS",
                "MONROVIA",
                "MONTEBELLO",
                "MONTEREY PARK",
                "MONTROSE",
                "MOUNT WILSON",
                "NEWHALL",
                "NORTH HILLS",
                "NORTH HOLLYWOOD",
                "NORTHRIDGE",
                "NORWALK",
                "PACIFIC PALISADES",
                "PACOIMA",
                "PALMDALE",
                "PALOS VERDES ESTATES",
                "PANORAMA CITY",
                "PARAMOUNT",
                "PASADENA",
                "PEARBLOSSOM",
                "PICO RIVERA",
                "PLAYA DEL REY",
                "PLAYA VISTA",
                "POMONA",
                "PORTER RANCH",
                "QUARTZ HILL",
                "RANCHO PALOS VERDES",
                "REDONDO BEACH",
                "RESEDA",
                "ROLLING HILLS",
                "ROLLING HILLS ESTATES",
                "ROSEMEAD",
                "ROWLAND HEIGHTS",
                "SAN DIMAS",
                "SAN FERNANDO",
                "SAN GABRIEL",
                "SAN MARINO",
                "SAN PEDRO",
                "SANTA CLARITA",
                "SANTA FE SPRINGS",
                "SANTA MONICA",
                "SAUGUS",
                "SHERMAN OAKS",
                "SIERRA MADRE",
                "SIGNAL HILL",
                "SOUTH EL MONTE",
                "SOUTH GATE",
                "SOUTH PASADENA",
                "STEVENSON RANCH",
                "STUDIO CITY",
                "SUN VALLEY",
                "SUN VILLAGE",
                "SUNLAND",
                "SYLMAR",
                "TARZANA",
                "TEMPLE CITY",
                "TOLUCA LAKE",
                "TOPANGA",
                "TORRANCE",
                "TUJUNGA",
                "UNIVERSAL CITY",
                "VALENCIA",
                "VALLEY GLEN",
                "VALLEY VILLAGE",
                "VALYERMO",
                "VAN NUYS",
                "VENICE",
                "VERNON",
                "WALNUT",
                "WEST COVINA",
                "WEST HILLS",
                "WEST HOLLYWOOD",
                "WESTLAKE VILLAGE",
                "WHITTIER",
                "WILMINGTON",
                "WINNETKA",
                "WOODLAND HILLS",
                "WRIGHTWOOD"
              ],
              "enumTitles": [
                "Acton",
                "Agoura Hills",
                "Agua Dulce",
                "Alhambra",
                "Altadena",
                "Arcadia",
                "Arleta",
                "Artesia",
                "Avalon",
                "Azusa",
                "Baldwin Hills",
                "Baldwin Park",
                "Bell",
                "Bell Gardens",
                "Bellflower",
                "Beverly Hills",
                "Bradbury",
                "Brentwood",
                "Burbank",
                "Calabasas",
                "Canoga Park",
                "Canyon Country",
                "Carson",
                "Castaic",
                "Century City",
                "Cerritos",
                "Chatsworth",
                "City Of Industry",
                "Claremont",
                "Commerce",
                "Compton",
                "Covina",
                "Cudahy",
                "Culver City",
                "Diamond Bar",
                "Downey",
                "Duarte",
                "Eagle Rock",
                "East Los Angeles",
                "El Monte",
                "El Segundo",
                "Encino",
                "Gardena",
                "Glendale",
                "Glendora",
                "Gorman",
                "Granada Hills",
                "Green Valley",
                "Hacienda Heights",
                "Harbor City",
                "Hawaiian Gardens",
                "Hawthorne",
                "Hermosa Beach",
                "Hollywood",
                "Huntington Park",
                "Industry",
                "Inglewood",
                "Irwindale",
                "La Canada Flintridge",
                "La Crescenta",
                "La Habra Heights",
                "La Mirada",
                "La Puente",
                "La Verne",
                "Lake Balboa",
                "Lake Hughes",
                "Lake Los Angeles",
                "Lake View Terrace",
                "Lakewood",
                "Lancaster",
                "Lawndale",
                "Lebec",
                "Lennox",
                "Leona Valley",
                "Littlerock",
                "Lomita",
                "Long Beach",
                "Los Angeles",
                "Lynwood",
                "Malibu",
                "Manhattan Beach",
                "Marina Del Rey",
                "Maywood",
                "Mission Hills",
                "Monrovia",
                "Montebello",
                "Monterey Park",
                "Montrose",
                "Mount Wilson",
                "Newhall",
                "North Hills",
                "North Hollywood",
                "Northridge",
                "Norwalk",
                "Pacific Palisades",
                "Pacoima",
                "Palmdale",
                "Palos Verdes Estates",
                "Panorama City",
                "Paramount",
                "Pasadena",
                "Pearblossom",
                "Pico Rivera",
                "Playa Del Rey",
                "Playa Vista",
                "Pomona",
                "Porter Ranch",
                "Quartz Hill",
                "Rancho Palos Verdes",
                "Redondo Beach",
                "Reseda",
                "Rolling Hills",
                "Rolling Hills Estates",
                "Rosemead",
                "Rowland Heights",
                "San Dimas",
                "San Fernando",
                "San Gabriel",
                "San Marino",
                "San Pedro",
                "Santa Clarita",
                "Santa Fe Springs",
                "Santa Monica",
                "Saugus",
                "Sherman Oaks",
                "Sierra Madre",
                "Signal Hill",
                "South El Monte",
                "South Gate",
                "South Pasadena",
                "Stevenson Ranch",
                "Studio City",
                "Sun Valley",
                "Sun Village",
                "Sunland",
                "Sylmar",
                "Tarzana",
                "Temple City",
                "Toluca Lake",
                "Topanga",
                "Torrance",
                "Tujunga",
                "Universal City",
                "Valencia",
                "Valley Glen",
                "Valley Village",
                "Valyermo",
                "Van Nuys",
                "Venice",
                "Vernon",
                "Walnut",
                "West Covina",
                "West Hills",
                "West Hollywood",
                "Westlake Village",
                "Whittier",
                "Wilmington",
                "Winnetka",
                "Woodland Hills",
                "Wrightwood"
              ]
            },
            "default": []
          },
          "facilityIds": {
            "title": "Facility IDs (mode=byFacilityId)",
            "type": "array",
            "description": "Exact LA County facility IDs, e.g. `FA0069601`. Returns the inspection history for each facility.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude (mode=nearby)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center point latitude in decimal degrees, e.g. `34.0522` (downtown Los Angeles).",
            "default": 34.0522
          },
          "longitude": {
            "title": "Longitude (mode=nearby)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center point longitude in decimal degrees, e.g. `-118.2437` (downtown Los Angeles).",
            "default": -118.2437
          },
          "radiusKm": {
            "title": "Search radius in km (mode=nearby)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Distance from the center point to search within.",
            "default": 2
          },
          "grades": {
            "title": "Filter by placard grade",
            "type": "array",
            "description": "Restrict to one or more posted letter grades. A = 90-100, B = 80-89, C = 70-79.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "enumTitles": [
                "A - 90-100 (Excellent)",
                "B - 80-89 (Good)",
                "C - 70-79 (Needs improvement)"
              ]
            },
            "default": []
          },
          "minScore": {
            "title": "Minimum inspection score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop inspections with a numeric score below this (0-100). Finer-grained than the letter-grade filter. Inspections with no numeric score on file always pass through."
          },
          "maxScore": {
            "title": "Maximum inspection score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop inspections with a numeric score above this (0-100). Inspections with no numeric score on file always pass through."
          },
          "riskLevels": {
            "title": "Filter by risk level",
            "type": "array",
            "description": "Restrict to facilities classified by the county at one or more risk levels (based on food-handling complexity, not grade).",
            "items": {
              "type": "string",
              "enum": [
                "LOW",
                "MODERATE",
                "HIGH"
              ],
              "enumTitles": [
                "Low Risk",
                "Moderate Risk",
                "High Risk"
              ]
            },
            "default": []
          },
          "programElements": {
            "title": "Filter by facility program category",
            "type": "array",
            "description": "Restrict to one or more county facility-type/size/risk program codes (restaurants by seat count, food markets by square footage).",
            "items": {
              "type": "string",
              "enum": [
                "1610",
                "1611",
                "1612",
                "1613",
                "1614",
                "1615",
                "1630",
                "1631",
                "1632",
                "1633",
                "1634",
                "1635",
                "1636",
                "1637",
                "1638",
                "1639",
                "1640",
                "1641"
              ],
              "enumTitles": [
                "1610 - Food Market Retail (1-1,999 sq ft) - Low Risk",
                "1611 - Food Market Retail (1-1,999 sq ft) - Moderate Risk",
                "1612 - Food Market Retail (1-1,999 sq ft) - High Risk",
                "1613 - Food Market Retail (2,000+ sq ft) - Low Risk",
                "1614 - Food Market Retail (2,000+ sq ft) - Moderate Risk",
                "1615 - Food Market Retail (2,000+ sq ft) - High Risk",
                "1630 - Restaurant (0-30 seats) - Low Risk",
                "1631 - Restaurant (0-30 seats) - Moderate Risk",
                "1632 - Restaurant (0-30 seats) - High Risk",
                "1633 - Restaurant (31-60 seats) - Low Risk",
                "1634 - Restaurant (31-60 seats) - Moderate Risk",
                "1635 - Restaurant (31-60 seats) - High Risk",
                "1636 - Restaurant (61-150 seats) - Low Risk",
                "1637 - Restaurant (61-150 seats) - Moderate Risk",
                "1638 - Restaurant (61-150 seats) - High Risk",
                "1639 - Restaurant (151+ seats) - Low Risk",
                "1640 - Restaurant (151+ seats) - Moderate Risk",
                "1641 - Restaurant (151+ seats) - High Risk"
              ]
            },
            "default": []
          },
          "serviceCodes": {
            "title": "Filter by inspection service type",
            "type": "array",
            "description": "Restrict to one or more inspection service types.",
            "items": {
              "type": "string",
              "enum": [
                "001",
                "401"
              ],
              "enumTitles": [
                "001 - Routine inspection",
                "401 - Owner-initiated inspection"
              ]
            },
            "default": []
          },
          "programStatus": {
            "title": "Filter by facility program status",
            "enum": [
              "",
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "Restrict to facilities whose program is currently active or inactive with the county.",
            "default": ""
          },
          "zipCodes": {
            "title": "Filter by ZIP code(s)",
            "type": "array",
            "description": "Restrict to one or more 5-digit ZIP codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Inspection date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include inspections on or after this date.",
            "default": ""
          },
          "dateTo": {
            "title": "Inspection date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include inspections on or before this date.",
            "default": ""
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order inspection records by activity date.",
            "default": "newest"
          },
          "includeViolations": {
            "title": "Include violation details",
            "type": "boolean",
            "description": "Attach the specific health-code violations (code, description, status, points) found during each inspection, plus a violation count and total point deduction. Adds a one-time ~10s county violations-file download per run.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}