CVS APIcvs.com ↗
Search CVS pharmacy locations by ZIP, get store hours, find products with NDC codes, and check real-time inventory at specific stores.
What is the CVS API?
The CVS API exposes 4 endpoints covering store discovery, store details, product search, and inventory availability. Use search_stores to find pharmacy locations near any ZIP code — including full weekly hours for both the retail store and the pharmacy — or call check_product_availability to verify a specific SKU is on-hand at a given store before making a trip.
curl -X GET 'https://api.parse.bot/scraper/8280d527-04e5-4cb9-86d9-c1d04a17953b/search_stores?limit=3&query=10001&radius=5' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace cvs-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""CVS Pharmacy: find stores, get details, and search products/medications."""
from parse_apis.cvs_pharmacy_api import CVS, StoreNotFound
client = CVS()
# Search for CVS stores near a ZIP code
for store in client.stores.search(query="10001", radius=5, limit=3):
print(store.address.street, store.address.city, store.address.state)
print(store.store_info.store_id, store.store_info.distance)
# Get full details for a specific store
store = client.stores.get(store_id="9767")
print(store.address.street, store.address.city)
for dept in store.hours.departments:
print(dept.name)
for day in dept.reg_hours:
print(day.weekday, day.start_time, day.end_time, day.break_start)
# Handle a non-existent store
try:
client.stores.get(store_id="0000000")
except StoreNotFound as exc:
print(f"Store not found: {exc.store_id}")
# Search for products and medications via typeahead
result = client.typeaheads.search(query="ibuprofen")
for product in result.product_suggestions:
print(product.text, product.total_searches)
for drug in result.drug_suggestions:
print(drug.text, drug.brand_name, drug.generic_name, drug.ndc11)
print("Exercised: stores.search, stores.get, typeaheads.search, StoreNotFound handling")
Search for CVS pharmacy locations by ZIP code. Returns a list of stores with addresses, phone numbers, distance, and full weekly hours for both the store and the pharmacy (including lunch breaks).
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of results to return |
| query | string | ZIP code to search near (e.g. '90210', '10001'). Only numeric ZIP codes reliably return results. |
| radius | integer | Search radius in miles |
{
"type": "object",
"fields": {
"storeList": "array of store objects with address, storeInfo, hours, indicators, and bannerBrand",
"statusCode": "string status code ('0000' for success)",
"totalResults": "integer total number of matching stores",
"statusDescription": "string indicating success or failure"
},
"sample": {
"data": {
"storeList": [
{
"hours": {
"timeZone": "EDT",
"departments": [
{
"name": "retail",
"regHours": [
{
"endTime": "Open 24 Hours",
"weekday": "MON",
"startTime": "Open 24 Hours"
}
]
},
{
"name": "pharmacy",
"regHours": [
{
"endTime": "07:00 PM",
"weekday": "MON",
"breakEnd": "02:00 PM",
"startTime": "09:00 AM",
"breakStart": "01:30 PM"
}
]
}
]
},
"address": {
"zip": "10001",
"city": "NEW YORK",
"state": "NY",
"street": "5 PENN PLAZA",
"country": "US"
},
"storeInfo": {
"storeId": "10613",
"distance": "0.27",
"latitude": "40.75217",
"longitude": "-73.99389",
"phoneNumbers": [
{
"retail": "2122169222",
"pharmacy": "2122169222"
}
]
},
"indicators": [
"RX_Pharmacy_Ind",
"RS_24Hours_Ind"
],
"bannerBrand": [
{
"bannerBrandInd": "1",
"bannerBrandDesc": "CVS"
}
]
}
],
"statusCode": "0000",
"statusTitle": "Success",
"totalResults": 25,
"statusDescription": "Success"
},
"status": "success"
}
}About the CVS API
Store Discovery and Details
search_stores accepts a numeric ZIP code, an optional radius in miles, and an optional limit. It returns a storeList array where each entry includes street address, phone numbers, storeInfo metadata, indicators for available services, and full weekly hours for both the retail floor and the pharmacy department — including lunch break windows. totalResults tells you how many locations matched regardless of the limit applied. get_store_details takes a single store_id (e.g. "9767") and returns the same shape for one store, useful when you already know the identifier and need up-to-date hours or service flags.
Product and Medication Search
search_products is a typeahead endpoint — pass any query string like "advil" or "bandaids" and the data object comes back segmented into categories: product suggestions with popularity signals, drug matches that include NDC codes plus brand and generic name pairings, healthcare entries linking to MinuteClinic services, and additional categories for articles, photo, and discover content. The metadata field returns a responseId and timeTaken so you can track latency across calls. Status is indicated by a statusCode string ("0000" for success) and a statusCodeDescription.
Inventory Availability
check_product_availability takes a sku and a store_id and returns a getATPInventoryResponse object. Inside, promiseLines contains per-store inventory detail broken into three counts: availableOnHand, pickOnHand, and storeOnHand. The responseStatus and organization fields provide request-level metadata. Note that response times can vary by store, and the endpoint reflects current inventory state rather than a historical record.
The CVS API is a managed, monitored endpoint for cvs.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cvs.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official cvs.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a pharmacy locator that surfaces the nearest CVS stores with current pharmacy hours including lunch closures
- Alert customers when a specific product SKU is back in stock at their preferred CVS store
- Look up NDC codes and brand/generic name pairs for medications using the drug suggestions in
search_products - Display store service indicators to show which locations offer drive-through, MinuteClinic, or other services
- Pre-trip stock check: verify
availableOnHandquantity for a product before routing a customer to a store - Aggregate and compare weekly retail and pharmacy hours across multiple stores in a metro area
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does CVS have an official public developer API?+
What does `search_stores` return beyond basic address information?+
storeList includes a full seven-day hours schedule for both the retail store and the pharmacy department, with pharmacy lunch-break windows included. It also returns indicators (service flags), bannerBrand, phone numbers, and distance from the queried ZIP code.Does the ZIP code query in `search_stores` accept city names or partial strings?+
Does the API return product pricing or promotions?+
Can I retrieve a store's full service list, such as whether it has a drive-through or photo center?+
indicators field in both search_stores and get_store_details responses contains service flags for the store. The exact set of indicator keys depends on the store. Detailed descriptions of each service type beyond the flag itself are not currently returned as a separate field. You can fork this API on Parse and revise it to expand the indicators mapping.