{
  "openapi": "3.0.1",
  "info": {
    "title": "Petbarn Scraper: Product Prices, Member Prices & Stock as JSON",
    "description": "Scrape Petbarn.com.au product listings by category: regular price, Petbarn's member/loyalty price, brand, stock, pack size, rating, and review count. No competitor pet-store scraper on Apify (Chewy, PetSmart, Zooplus) exposes a loyalty-price field. No login needed. From $0.69 per 1,000 products.",
    "version": "0.0",
    "x-build-id": "p0NQzSLrkvUyg3VG2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~petbarn-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-petbarn-product-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/getascraper~petbarn-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-petbarn-product-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/getascraper~petbarn-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-petbarn-product-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": [
          "categoryUrls"
        ],
        "properties": {
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Full Petbarn category browse page URLs, e.g. https://www.petbarn.com.au/c/dogs/dog-food or https://www.petbarn.com.au/c/cats/cat-food. Each category page lists its products directly with price, brand, and stock data built in, so no extra requests are needed to read the core fields. The actor follows Petbarn's own /page/2, /page/3, ... pagination for each category automatically, stopping once a page returns no more products or the Max Products limit below is reached.",
            "default": [
              {
                "url": "https://www.petbarn.com.au/c/dogs/dog-food"
              },
              {
                "url": "https://www.petbarn.com.au/c/cats/cat-food"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "brand": {
            "title": "Brand Filter",
            "type": "array",
            "description": "One brand per line, for example \"Royal Canin\" or \"Black Hawk\" (case-insensitive, partial match, so \"royal canin\" also matches \"Royal Canin Veterinary Diet\"). Leave empty to keep every brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only keep variants whose product has a customer rating of at least this many stars out of 5."
          },
          "minPrice": {
            "title": "Minimum Price",
            "minimum": 0,
            "type": "number",
            "description": "Only keep variants priced at or above this amount, in AUD, using the regular (non-member) price."
          },
          "maxPrice": {
            "title": "Maximum Price",
            "minimum": 0,
            "type": "number",
            "description": "Only keep variants priced at or below this amount, in AUD, using the regular (non-member) price."
          },
          "onlyOnSale": {
            "title": "Only Member/Loyalty Discounted Variants",
            "type": "boolean",
            "description": "When enabled, only variants that actually have a lower Petbarn member/loyalty price than the regular price are kept. Leave this off to get every variant regardless of whether a member discount applies.",
            "default": false
          },
          "onlyInStock": {
            "title": "Only In-Stock Variants",
            "type": "boolean",
            "description": "When enabled, pack-size variants that Petbarn currently lists as out of stock are dropped from the output instead of being included with an Out of Stock status. Leave this off to get a complete snapshot of the catalog, including sold-out sizes, which is useful for tracking when stock comes back.",
            "default": false
          },
          "scrapeProductDetail": {
            "title": "Fetch Full Product Detail Page",
            "type": "boolean",
            "description": "When enabled, the actor also opens each product's own detail page to collect its full description, GTIN/barcode, and pack weight, fields that are not present on the category listing page. Leave this off to keep runs fast and cheap: the category page already returns the fields most people need (name, brand, regular price, Petbarn member/loyalty price, availability, star rating, review count, and SKU per pack size) with zero extra requests. Turning this on roughly doubles the number of requests the run makes, since it adds one detail-page request per product.",
            "default": false
          },
          "maxItems": {
            "title": "Max Products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of distinct products to scrape across all category URLs combined. A single product can still produce more than one output row if it comes in multiple pack sizes, for example a dog food sold in 3kg, 10kg, and 20kg bags, each with its own SKU, price, and member price. Keep this modest for a first test run; raise it once you know how many rows a given category produces.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Petbarn's category and product pages are plain server-rendered HTML with no anti-bot wall, confirmed live, so Apify's standard datacenter proxy is sufficient and keeps this run cheap. Only switch to residential if you start seeing blocked or empty responses.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}