Skip to content

Add Instacart marketplace adapter#16

Open
ankitranjan7 wants to merge 2 commits into
mainfrom
add-instacart-adapter
Open

Add Instacart marketplace adapter#16
ankitranjan7 wants to merge 2 commits into
mainfrom
add-instacart-adapter

Conversation

@ankitranjan7

@ankitranjan7 ankitranjan7 commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • Add no-key, browser-backed Instacart marketplace adapter commands
  • Add stores and categories to discover visible retailers and retailer collection links
  • Add storefront, collection, and product to read visible product cards/details
  • Add parser tests for retailer, category, product-card, product-detail extraction and typed error behavior

Commands Added

webcmd instacart stores --limit 5
webcmd instacart storefront sprouts --limit 5
webcmd instacart categories sprouts --limit 5
webcmd instacart collection sprouts produce --limit 5
webcmd instacart product 16616932 --retailer sprouts

stores columns: rank, slug, name, delivery, pickup, tags, url.

storefront columns: rank, productId, title, priceText, originalPriceText, discount, size, stock, url.

categories columns: rank, slug, name, url.

collection columns: rank, productId, title, priceText, originalPriceText, discount, size, stock, url.

product columns: productId, title, priceText, originalPriceText, discount, size, stock, retailer, url.

Notes

  • Official Instacart Developer Platform endpoints require API-key access, so this PR uses the public marketplace UI and the user's normal CloakBrowser session.
  • Store availability, collection order, and product cards depend on the active Instacart location/session.
  • Product parsing prefers visible product headings and rejects button-label pollution like Add.
  • Collection navigation validates the browser is on the requested collection route before extracting rows, avoiding accidental storefront results after SPA navigation bounces.

Verification

  • npm run build-manifest
  • npm run test:adapter -- clis/instacart/instacart.test.js
  • npm run dev -- instacart stores --limit 3 -f json
  • npm run dev -- instacart storefront sprouts --limit 3 -f json
  • npm run dev -- instacart categories sprouts --limit 3 -f json
  • npm run dev -- instacart collection sprouts produce --limit 3 -f json
  • npm run dev -- instacart product 16616932 --retailer sprouts -f json
  • npm run dev -- browser work verify instacart/stores --strict-memory
  • npm run dev -- browser work verify instacart/storefront --strict-memory
  • npm run dev -- browser work verify instacart/categories --strict-memory
  • npm run dev -- browser work verify instacart/collection --strict-memory
  • npm run dev -- browser work verify instacart/product --strict-memory
  • npm run check:silent-column-drop
  • npm run check:typed-error-lint
  • npm run typecheck
  • npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant