{
  "openapi": "3.0.1",
  "info": {
    "title": "Malaysia Halal Directory Scraper - JAKIM Companies & Products",
    "description": "Malaysia halal directory scraper and API (JAKIM / MYeHALAL): search halal certified companies or products by keyword, category and state. One row per company or product: certificate expiry, address, phone, e-mail, website, products, brands. Only JAKIM actor on the Store. No login. $1.50 per 1,000.",
    "version": "1.0",
    "x-build-id": "Br9fbId2O7jqV1Drt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~malaysia-halal-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-malaysia-halal-directory-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/rel8ble~malaysia-halal-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-malaysia-halal-directory-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/rel8ble~malaysia-halal-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-malaysia-halal-directory-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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search words",
            "type": "array",
            "description": "Words to find. Companies mode matches the company / premise name (e.g. \"sauce\", \"bakery\", \"sdn\", \"coffee\"); products mode matches the product name (e.g. \"chicken nugget\", \"soy sauce\", \"lipstick\"). Required: the directory has no browse-all. A broad word like \"sdn\" or \"bhd\" lists most companies.",
            "default": [
              "sauce"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "companies",
              "products"
            ],
            "type": "string",
            "description": "companies = one row per certificate holder (address, all certificate expiry dates, and with details: phone, company e-mail, website, product list). products = one row per certified product (name, brand, company, expiry).",
            "default": "companies"
          },
          "categories": {
            "title": "Certificate categories",
            "type": "array",
            "description": "Limit to these JAKIM certificate categories. Empty = all (companies) or all six product categories (products). Food premises, logistics, abattoirs and OEM exist only as companies.",
            "items": {
              "type": "string",
              "enum": [
                "PR",
                "KO",
                "FM",
                "BG",
                "MD",
                "IN",
                "OEM",
                "PE",
                "PL",
                "PS"
              ],
              "enumTitles": [
                "PR - Food & beverage products (Produk Makanan / Minuman)",
                "KO - Cosmetics & personal care (Kosmetik dan Dandanan Diri)",
                "FM - Pharmaceuticals (Farmaseutikal)",
                "BG - Consumer goods (Barang Gunaan)",
                "MD - Medical devices (Peranti Perubatan)",
                "IN - International / imported products (International)",
                "OEM - Contract manufacturing / OEM (Pengilangan Kontrak)",
                "PE - Food premises: restaurants, caterers, bakeries (Premis Makanan)",
                "PL - Logistics: warehousing, transport (Logistik)",
                "PS - Abattoirs / slaughterhouses (Rumah Sembelihan)"
              ]
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Limit to companies in these Malaysian states. Empty = all of Malaysia.",
            "items": {
              "type": "string",
              "enum": [
                "01",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16"
              ],
              "enumTitles": [
                "Johor",
                "Kedah",
                "Kelantan",
                "Melaka",
                "Negeri Sembilan",
                "Pahang",
                "Pulau Pinang",
                "Perak",
                "Perlis",
                "Selangor",
                "Terengganu",
                "Sabah",
                "Sarawak",
                "W.P. Kuala Lumpur",
                "W.P. Labuan",
                "W.P. Putrajaya"
              ]
            }
          },
          "includeDetails": {
            "title": "Include company details (phone, e-mail, website, product list)",
            "type": "boolean",
            "description": "Opens each company's certificate page once (cached per company): phone, fax, company e-mail (free-mail and personal addresses removed), website, JAKIM reference numbers and, in companies mode, the full certified product list. About 2 seconds per company; turn off for fast name / address / expiry lists.",
            "default": true
          },
          "onlyValid": {
            "title": "Only valid certificates",
            "type": "boolean",
            "description": "Skip rows whose latest expiry date is already past (not saved, not charged).",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Rows to save (companies or products). 0 = all that match. Cost is per saved row.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}