{
  "openapi": "3.0.1",
  "info": {
    "title": "Bodega Aurrera Scraper - Products, Prices & Stores (Mexico)",
    "description": "Scrape Bodega Aurrera Mexico products and prices by keyword, category or product link, priced for a postal code or store.",
    "version": "0.1",
    "x-build-id": "YKsv8PR9amQ6NBk7K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jmlp~bodega-aurrera-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jmlp-bodega-aurrera-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/jmlp~bodega-aurrera-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jmlp-bodega-aurrera-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/jmlp~bodega-aurrera-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jmlp-bodega-aurrera-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What you would type into Bodega Aurrera's search box, one per line: 'leche', 'aceite', 'detergente'. Each search pages through all its results.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Bodega Aurrera links",
            "type": "array",
            "description": "Paste links straight from your browser: a category (www.bodegaaurrera.com.mx/content/leche/120096 or /browse/...), a search (/search?q=...) or a product (/ip/...). Bare category ids (120096) and product ids (00750649502153) work too. Product links are priced at each store like everything else.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Price everything for the Bodega Aurrera store nearest each postal code, e.g. 97000 (Merida, Yucatan). The run looks the stores up with the site's own store finder; the STORES record lists every store near each code with its id, address and distance.",
            "items": {
              "type": "string"
            }
          },
          "storeIds": {
            "title": "Store IDs",
            "type": "array",
            "description": "Price everything for these stores, by Bodega Aurrera's store number, e.g. 2029 (Ba Merida Itzaes). Get the numbers from a run with postal codes. With no store and no postal code, prices are the website's default ones (store 3874, Coyoacan, CDMX).",
            "items": {
              "type": "string"
            }
          },
          "storesPerPostalCode": {
            "title": "Stores per postal code",
            "type": "integer",
            "description": "How many of the nearest stores to price for each postal code, 1 to 25. 1 is the nearest only; 10 covers most of a city like Merida. Every search runs once per store.",
            "default": 1
          },
          "includeOnlineOffers": {
            "title": "Include online-only offers",
            "type": "boolean",
            "description": "Keep products the chosen store does not sell itself but the website ships from a fulfilment centre or a marketplace seller. They carry the website's general price and are marked price_scope 'online', never as the store's price.",
            "default": true
          },
          "maxItems": {
            "title": "Max products",
            "type": "integer",
            "description": "Stop after this many records across every search, link and store. Caps both runtime and cost. Empty means everything found."
          },
          "maxItemsPerSearch": {
            "title": "Max products per search, category or link",
            "type": "integer",
            "description": "Cap each search or category at each store separately, so one big category does not use up 'Max products' alone."
          },
          "sort": {
            "title": "Sort order",
            "type": "string",
            "description": "The order the site lists results in. With a product cap it decides which products you get first: price_low collects the cheapest. Other spellings are read too (precio menor, cheapest).",
            "default": "best_match"
          },
          "splitByPrice": {
            "title": "Complete listings (100%)",
            "type": "boolean",
            "description": "The site's own pages skip products. With this on, every search and category is also split by price (and by brand where one price holds too many) into pieces that each fit one page, so every product the site can display is found. The run's SUMMARY proves it per listing: found plus 'counted but never displayed' equals the site's own count. Off: only what the site's pages list (about 80-90%), with fewer requests.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Requests at once",
            "type": "integer",
            "description": "How many requests to make in parallel, 1 to 20, each from its own exit IP. 4 is gentle on the site and fast enough for thousands of products.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy works. Requests the site refuses are retried from fresh exits, then through Apify's Unblocker and a Mexican residential exit when your plan has them.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resume": {
            "title": "Checkpoint progress",
            "type": "boolean",
            "description": "Save progress every ~30s so a run that gets migrated or restarted by the platform picks up where it stopped, without repeating products.",
            "default": true
          },
          "continueFromLastRun": {
            "title": "Continue from last run",
            "type": "boolean",
            "description": "If your previous run with the same input was interrupted, scrape only what it missed. Products already collected stay in THAT run's dataset.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}