# Walgreens API scraper — search walgreens.com, read the full US drugstore product record (shelf price, promotions, UPC/GTIN-14, online and in-store availability, the exact review average, active and inactive ingredients, warnings and shipping restrictions), browse any category with real pagination, and resolve up to 50 product ids in a single call. No account, no browser.

> Search walgreens.com by keyword and get up to 72 products with price, promotion, unit price, online and in-store availability, UPC and GTIN-14, brand, size, half-star rating and review count, plus the active and inactive ingredient lists for OTC items. MEASURED LIMIT: this surface publishes ONE page — `?p=2` is silently ignored by Walgreens (same 72 rows, same first product), so `search` returns at most 72 products and reports the source's own total beside them. For the full depth of a shelf use `category/products`, which really pages. When a keyword is itself a Walgreens aisle (for example `toothpaste`), the site redirects to that aisle; the engine follows it into the category listing and `resolved_via` tells you which route answered.
> ReefAPI engine `walgreens` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/walgreens/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Send the key as `Authorization: Bearer <key>`, or put it in the URL (`?key=<key>`) when the client has no header field, as ChatGPT does.

## Endpoints

### POST https://api.reefapi.com/walgreens/v1/search — 3 credits
Search walgreens.com by keyword and get up to 72 products with price, promotion, unit price, online and in-store availability, UPC and GTIN-14, brand, size, half-star rating and review count, plus the active and inactive ingredient lists for OTC items. MEASURED LIMIT: this surface publishes ONE page — `?p=2` is silently ignored by Walgreens (same 72 rows, same first product), so `search` returns at most 72 products and reports the source's own total beside them. For the full depth of a shelf use `category/products`, which really pages. When a keyword is itself a Walgreens aisle (for example `toothpaste`), the site redirects to that aisle; the engine follows it into the category listing and `resolved_via` tells you which route answered.

**Parameters:**
- `query` (string, required) — Keyword to search, as a shopper would type it (`ibuprofen`, `blood pressure monitor`, `sunscreen spf 50`).
- `max_results` (integer, optional, default 72) — Trim the answer to the first N products. The surface itself publishes at most 72, so values above 72 are clamped to 72.

**Returns:** results[]{product_id, sku_id, title, display_title, url, brand, brand_id, size, product_type, upc, gtin, store_upc, pln, image, image_thumb, currency, price, price_display, price_form, regular_price, regular_price_display, sale_price, sale_price_display, on_sale, source_on_sale_flag, multi_buy{quantity, total, unit_price_implied}, regular_multi_buy, single_unit_price, unit_price, unit_price_unit, price_rule, rating_half_star, rating_display, review_count, in_stock, online_status, store_status, clearance, own_brand, age_restricted, fsa_hsa_eligible, promo_label, coupon_label, coupon_terms, sitewide_offer, active_ingredients[], inactive_ingredients[], category_ids{tier1, tier2, tier3}, same_day_purchase_limit}, query, matched_keyword, total, online_total, in_store_total, returned, page_size_published, has_more_on_source, resolved_via, category_id

**Example request body:**
```json
{
  "query": "ibuprofen",
  "max_results": 24
}
```

### POST https://api.reefapi.com/walgreens/v1/category/products — 2 credits
List the products of one or more Walgreens categories (tier-3 aisle ids, the same ids every product row reports as `category_ids.tier3`) with REAL pagination: up to 100 products per page and up to 15 pages. Several category ids in one call are merged into a single result set by Walgreens. Each row carries the same price, promotion, UPC/GTIN, availability and ingredient fields as `search`. MEASURED CEILING: Walgreens refuses page 16 and above at every page size, so at most 1,500 products of a category are reachable even when it reports more; `last_page`, `page_cap` and `has_more` say exactly where you are.

**Parameters:**
- `category_id` (array, required) — One or more Walgreens tier-3 category ids, e.g. `361471` (Non-Aspirin Pain Relievers) or `360481,360967`. Take them from any product row's `category_ids.tier3`, or from `category.tier3.id` on a product record. Several ids are merged by the source into one list.
- `page` (integer, optional, default 1) — 1-based page. Walgreens refuses page 16 and above at every page size (measured), so the usable range is 1-15.
- `page_size` (integer, optional, default 24) — Products per page, 1-100. 101 and above is refused by the source, so larger values are clamped to 100.

**Returns:** results[] (same row shape as `search`), category_id[], total, online_total, in_store_total, page, page_size, returned, source_pages, last_page, page_cap, has_more, reachable_results, dropped_tiles

**Example request body:**
```json
{
  "category_id": "361471",
  "page": 1,
  "page_size": 24
}
```

### POST https://api.reefapi.com/walgreens/v1/product/detail — 1 credit
The full Walgreens product record by product id or product URL: shelf price and every promotion kept apart, the EXACT review average (the list surfaces only publish a half-star bucket), unit price, employee price labelled as such, UPC and GTIN-14, PLN, online/pickup/same-day availability, FSA-HSA and EBT eligibility, the marketing description, OTC uses and warnings, the active and inactive ingredient groups, shipping weight, pack dimensions and the US states Walgreens will not ship it to, plus the three-level category path. Walgreens does not publish individual review texts on this surface.

**Parameters:**
- `product_id` (string, required) — Walgreens product id as published in `product_id` on any row (`300394826` or `prod6330754`). A full product URL (`https://www.walgreens.com/store/c/.../ID=300394826-product`) is accepted and the id is read out of it.

**Returns:** product{product_id, sku_id, title, display_title, url, brand, brand_id, brand_url, size, product_type, upc, gtin, pln, article_id, image, images[], currency, price, price_display, price_form, regular_price, regular_price_display, sale_price, sale_price_display, on_sale, multi_buy{quantity, total, unit_price_implied}, regular_multi_buy, single_unit_price, unit_price, unit_price_unit, price_rule, employee_price, employee_price_display, rating, rating_display, review_count, in_stock, availability{ship, pickup, same_day_delivery, options[], add_to_cart}, clearance, own_brand, fsa_hsa_eligible, ebt_eligible, age_restricted, description, warnings, ingredients[]{group, types[]{type, items[]}}, offers[]{type, title, description, sub_description, link_text, plu_code, event_code, starts_at, ends_at}, sitewide_offer, shipping{weight_lb, dimensions_in, restricted_states[], message}, category{tier1, tier2, tier3}{id, name, url}, meta_description}

**Example request body:**
```json
{
  "product_id": "300394826"
}
```

### POST https://api.reefapi.com/walgreens/v1/product/batch — 3 credits
The same full product record as `product/detail` for up to 50 product ids in ONE upstream call — the cheapest way to refresh a basket, a price file or a GTIN map. Walgreens answers one record per id (asked 15/25/50 ids, got 15/25/50); ids it does not know are reported in `missing_ids` instead of failing the call.

**Parameters:**
- `product_ids` (array, required) — 1-50 Walgreens product ids, as a list or a comma-separated string: `300394826,prod3933218,prod6330754`. More than 50 is clamped to the first 50 and reported in `meta.warnings`.

**Returns:** products[] (same record shape as `product/detail`), requested, returned, missing_ids[]

**Example request body:**
```json
{
  "product_ids": "300394826,prod3933218,prod6330754"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=walgreens
- Human docs page: https://reefapi.com/docs/walgreens
- Overview page: https://reefapi.com/walgreens-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
