{
  "openapi": "3.0.1",
  "info": {
    "title": "Woolworths Australia Scraper - Prices, Specials and Barcodes",
    "description": "Scrape the Woolworths Australia grocery catalogue: product name, brand, AUD price, was-price, unit price, specials, barcode/GTIN, pack size, stock and image. Search by keyword, look products up by barcode, browse a department or read full detail by stockcode.",
    "version": "0.1",
    "x-build-id": "lqcoOBIo2np8J3u3Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~woolworths-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-woolworths-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/s-r~woolworths-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-woolworths-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/s-r~woolworths-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-woolworths-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": {
          "operation": {
            "title": "What to do",
            "enum": [
              "search",
              "barcode",
              "product",
              "category"
            ],
            "type": "string",
            "description": "Search the catalogue by keyword, look products up by barcode or GTIN, read full detail for known stockcodes, or browse a whole department.",
            "default": "search"
          },
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search the Woolworths catalogue for, one term per line. Used when the operation is 'Search by keyword'. Every term is run separately and each row records which term found it.",
            "default": [
              "tim tam"
            ],
            "items": {
              "type": "string"
            }
          },
          "barcodes": {
            "title": "Barcodes / GTINs",
            "type": "array",
            "description": "EAN-13, UPC-A or GTIN codes to look up, one per line. Short codes are left-padded with zeros so a 12-digit UPC matches its 13-digit GTIN. A code Woolworths does not stock comes back as a row with found set to false, never as a substitute product.",
            "items": {
              "type": "string"
            }
          },
          "stockcodes": {
            "title": "Woolworths stockcodes",
            "type": "array",
            "description": "Woolworths' own product ids, one per line, for the 'Product detail by stockcode' operation. A stockcode that no longer resolves comes back with found set to false rather than as a nameless product priced at zero.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "A Woolworths department to browse, by its web name, for example fruit-veg, bakery, meat-seafood-deli or freezer. A name that does not match returns the list of ones that do."
          },
          "specials_only": {
            "title": "On special only",
            "type": "boolean",
            "description": "Returns only products currently on promotion. Woolworths applies this itself: with it on, 36 of 44 rows for 'chocolate' were on special, against 14 of 44 with it off.",
            "default": false
          },
          "sort_by": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "best_match",
              "price_asc",
              "price_desc",
              "unit_price_asc",
              "unit_price_desc",
              "name"
            ],
            "type": "string",
            "description": "How Woolworths orders the results. Price and unit-price orders are applied by Woolworths and visibly hold: price ascending opened at $0.89 and descending at $1,298.99 on the same search.",
            "default": "relevance"
          },
          "with_details": {
            "title": "Add ingredients and nutrition",
            "type": "boolean",
            "description": "Opens each product's own record for ingredients, nutrition panel and country of origin. One extra request per product, so runs are much slower and cost more.",
            "default": false
          },
          "max_results": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many products to return in total. A catalogue page carries about 36.",
            "default": 100
          },
          "max_pages": {
            "title": "Maximum pages per search term",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Stops each search term or category after this many pages even if the product target has not been reached.",
            "default": 20
          },
          "retries": {
            "title": "Retries per request",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times to re-ask for a page that did not come back. Woolworths is steady, so the default is enough for almost every run.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}