Peru Supermarket Scraper
Pricing
Pay per usage
Peru Supermarket Scraper
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Oscar D. Villegas Aguirre
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Peru Supermarket Scraper — plazaVea & Tottus
Collect public product listings and PEN prices from plazaVea and Tottus in Peru. Search by text or browse a retailer category, then receive a consistent dataset with product names, brands, prices, images and product links.
The Actor uses native HTTP requests: plazaVea's public VTEX catalog and Tottus's embedded JSON. No browser automation, retailer login or proxy is configured.
Use the results for price research, catalog comparisons and periodic snapshots in your own workflow. This Actor retrieves a current snapshot; it does not maintain historical price comparisons or send alerts.
Start with a small search
In Apify Console, open the Actor's Input, switch to JSON if needed, and use:
{"retailers": ["plazavea", "tottus"],"mode": "search","queries": ["arroz"],"maxItemsPerQuery": 10}
Start the run, wait for SUCCEEDED, and open its dataset. This input scans up to 10 catalog positions per retailer, not 10 across both stores. Fewer records may be saved when a listing lacks the required fields or prices.
Download the results using the dataset export options in Apify Console. A successful build alone does not prove a successful extraction: inspect the run status, logs and dataset.
What you get
Each saved record has exactly these 13 fields:
| Field | Type | Meaning |
|---|---|---|
scraped_at | string | ISO timestamp when the record was normalized |
retailer | string | plazavea or tottus for the supported scope |
sku | string | Retailer's product ID, not its variant/SKU ID |
ean | string or null | First plazaVea SKU's barcode; null for Tottus |
title | string | Product name |
brand | string | Product brand |
category | string | plazaVea top-level category, or Tottus category-listing label; empty when no name is exposed |
currency | string | Always PEN |
price | number | Public selling price from the selected source |
list_price | number | Public regular/list price from the selected source |
available | boolean or null | plazaVea's availability flag; null for Tottus, not inferred from delivery text |
image_url | string or null | First product image, or null when missing/invalid |
product_url | string | Link to the product on the retailer's website |
Illustrative Tottus record; these prices are an example, not a live quote:
{"scraped_at": "2026-11-16T16:00:00.000Z","retailer": "tottus","sku": "113707060","ean": null,"title": "Arroz Faraon Extra Bolsa 5 Kg","brand": "FARAON","category": "","currency": "PEN","price": 23.9,"list_price": 26.9,"available": null,"image_url": "https://media.tottus.com.pe/tottusPE/41086701_1/public","product_url": "https://www.tottus.com.pe/tottus-pe/articulo/113707060/arroz-faraon-extra-bolsa-5-kg"}
How prices are selected
- plazaVea: first SKU, first seller's
commertialOffer.PriceandListPrice. Zero prices and products marked unavailable are retained. - Tottus:
internetPriceforprice, andnormalPriceforlist_price, selected by price type rather than array order. Card-exclusivecmrPriceis not substituted for the ordinary selling price. - Records missing required identity, brand or price fields are skipped with warnings. In particular, Tottus records without both required price types are not saved. No missing prices or stock values are fabricated.
Input reference
| Field | Default | Accepted values / behavior |
|---|---|---|
retailers | ["plazavea"] | Use plazavea, tottus, or both |
mode | "search" | search or category |
queries | ["arroz"] | Non-empty text strings in search mode, such as arroz or leche gloria |
categoryPaths | [] | Non-empty retailer-specific paths in category mode |
maxItemsPerQuery | 20 | Integer 1–500; catalog positions scanned per retailer and query/category |
EAN values can be supplied as search text, but neither adapter guarantees exact barcode matching.
The code and input interface retain legacy metro and wong options. They are not live-verified or part of the current supported offering. Use plazaVea and Tottus only.
Category examples
Category identifiers are retailer-specific. Run categories for the two retailers separately; a Tottus category is not a VTEX slug.
plazaVea
{"retailers": ["plazavea"],"mode": "category","categoryPaths": ["abarrotes"],"maxItemsPerQuery": 5}
Tottus
{"retailers": ["tottus"],"mode": "category","categoryPaths": ["CATG16076/Carnes"],"maxItemsPerQuery": 5}
For Tottus, include the actual CATG... identifier and category label from its listing URL. Category paths can change; an example is not a guarantee of future availability.
Request limits and reliability
- Requests run sequentially, with a 400 ms pause between requests across all retailers and queries.
- HTTP 429/503 receives two retries, with 800 ms and 1600 ms pauses. Other HTTP errors fail the run.
- Each fetch has a 30-second timeout.
- plazaVea uses inclusive VTEX windows of up to 50 products. Tottus uses one-based page numbers and its observed 48-product pages.
- Extraction stops at the configured scan cap, empty pages or the relevant pagination boundary. Tottus repeated or misnumbered pages fail instead of silently producing repeated output.
- Invalid JSON, missing Tottus embedded data or access restrictions fail visibly; no anti-bot bypass is implemented.
- Already saved records remain available if a later request fails. A failed run can therefore have partial output.
- Overlapping queries and repeated runs may produce duplicates. There is no global deduplication.
Important limitations
Prices and availability reflect the retailer's default public context, which may differ by seller, sales channel, location and time. They are not guaranteed checkout prices or complete inventory information.
Tottus is read from inert __NEXT_DATA__ JSON; scripts in the page are never executed. Its stock and EAN are not verified, and search listings do not expose a usable category name. Page-format changes may require adapter maintenance.
The Actor does not guarantee exhaustive catalog coverage. Respect retailer terms, robots policies and applicable data-use requirements. No personal customer information is intentionally collected.
Troubleshooting
| Symptom | What to check |
|---|---|
| Fewer records than the cap | Inspect warnings for missing fields/prices; the cap counts positions scanned, not valid records guaranteed |
| No category results | Check the current retailer category path; do not mix Tottus CATG paths with VTEX slugs |
| HTTP 403, repeated 429/503 or timeout | Inspect the run log and retailer availability; do not bypass restrictions |
Tottus available is null | Expected: delivery messages do not verify inventory |
| Run failed after saving products | Inspect the partial dataset and SCRAPE_STATE; failure does not delete earlier results |
| Duplicate products | Check overlapping queries or repeated local runs; deduplication is not implemented |
The default key-value store's SCRAPE_STATE record contains savedItems, status and updatedAt. On a graceful abort, the Actor cancels requests, settles pending writes, saves this tally and exits. This is not a resume cursor. Restarting can repeat products.
Local development and verification
Use a patched Node 24 release for the installed development toolchain, npm and Apify CLI. The Docker builder uses Node 24 and the production image uses Node 20.
On Windows with Node 24.19.0, a local plazaVea category test saved its records but failed during process shutdown with UV_HANDLE_CLOSING. This also occurred with compiled JavaScript. Node 24.20.0 includes a Windows assertion fix. A controlled rerun of the unchanged compiled Actor on portable Node 24.20.0 exited successfully and validated all 5 records; all 18 unit tests also passed. Use a patched runtime for local verification. The existing global Node installation was not changed. Do not count a run with a nonzero exit code as passed, even if records were saved.
npm cinpm testnpm run buildnpm run lintapify validate-schema
Run the existing examples:
npm run test:localnpm run test:local:tottusapify run --no-purge --input-file examples/plazavea-category.jsonapify run --no-purge --input-file examples/tottus-category.json
The first command uses storage/key_value_stores/default/INPUT.json; the second uses examples/tottus-search.json and scans 50 positions to exercise two pages.
Local runs preserve storage and append results under storage/datasets/default/. Apify CLI may replace the local default INPUT with the selected input file. Back up a custom INPUT before testing. Local storage is not uploaded to Apify Console.
Local tests have exercised both adapters with real products. A platform build and run are still required to validate deployment from Apify's environment.
Deployment and Store setup — maintainers
The .actorignore upload allowlist includes only the 15 audited build files. Local instructions, task logs, tests and storage are excluded. Apify CLI always includes .actor/ files regardless of ignore patterns, so test/deployment.test.ts also rejects unexpected files there and external Docker contexts. Update the allowlist and its regression test deliberately when adding build inputs; never keep credentials in .actor/ or source files.
- Log in to the intended account with
apify login. - Deploy with
apify push. This creates or updates the Actor named in.actor/actor.json; confirm the destination before running it. - Confirm the platform build succeeds, then run the small two-retailer search above and inspect the dataset and actual run cost.
- In the Actor's Publishing settings, complete the required listing information and sample output. The owner must review and accept the Store Publishing Terms.
- Configure a deliberate price before enabling paid use. The
apify-default-dataset-itemsynthetic event can charge per default-dataset record already saved byActor.pushData(); do not add a second charge for the same output. - Complete the account's required payout/billing verification, publish to Store, and verify the public page. Publication does not require publishing source code.
The Store Pricing tab is the authoritative price for customers. A scan cap is not a spending limit. Publishing enables distribution but does not guarantee usage, revenue or profit; price selection requires observed platform costs. This repository does not assert that Store publication or monetization has already been activated.