Discover/Costco API
live

Costco APIcostco.com

Search Costco's product catalog, fetch member reviews, browse savings deals, and find warehouse locations via a structured API with 8 endpoints.

Endpoints
8
Updated
2mo ago

What is the Costco API?

The Costco.com API covers 8 endpoints that expose product search, category browsing, detailed product data, member reviews, warehouse locations, and current promotions. The search_products endpoint returns a response.docs array with pricing, ratings, and availability, while get_product_details accepts comma-separated item numbers and returns priceData, description, and attributes per product. Specialized endpoints cover precious metals and pharmacy/health products as discrete query surfaces.

Try it
Number of results per page
Search keyword (e.g., 'television', 'organic coffee')
Pagination offset (0-based)
Sort order: price_low_high, price_high_low, top_rated, best_match
api.parse.bot/scraper/1802ebc9-74ad-4148-ab24-013ecb147fa5/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/1802ebc9-74ad-4148-ab24-013ecb147fa5/search_products?rows=24&query=television&start=0&sort_by=price_low_high' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

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 costco-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.

"""
Costco API - Usage Example

Get your API key from: https://parse.bot/settings
"""
import requests
import os


class ParseClient:
    """Client for Costco API."""

    def __init__(self, api_key=None):
        self.api_key = api_key or os.getenv("PARSE_API_KEY")
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "1802ebc9-74ad-4148-ab24-013ecb147fa5"

    def _call(self, endpoint, method="POST", **params):
        """Make API call."""
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {
            "X-API-Key": self.api_key,
            "Content-Type": "application/json",
        }
        payload = dict(params)
        if method.upper() == "GET":
            response = requests.get(url, headers=headers, params=payload)
        else:
            response = requests.post(url, headers=headers, json=payload)
        response.raise_for_status()
        data = response.json()
        return data

    def search_products(self, query, rows=None, start=None, sort_by=None):
        """Search for products by keyword with pagination and sorting. Returns product listings with pricing, ratings, images, and availability information."""
        return self._call("search_products", method="GET", query=query, rows=rows, start=start, sort_by=sort_by)

    def get_category_listing(self, category_path, rows=None, start=None):
        """Browse products within a specific category path. Returns paginated product listings for a given category URL path."""
        return self._call("get_category_listing", method="GET", category_path=category_path, rows=rows, start=start)

    def get_product_details(self, item_numbers):
        """Get detailed product information including price, descriptions, attributes, and ratings via GraphQL. Accepts one or more item numbers from search results."""
        return self._call("get_product_details", method="POST", item_numbers=item_numbers)

    def get_product_reviews(self, product_id, limit=None, offset=None):
        """Get member reviews for a specific product. Uses the Costco catalog product ID (group_id from search results), not the item_number."""
        return self._call("get_product_reviews", method="GET", product_id=product_id, limit=limit, offset=offset)

    def get_warehouse_locations(self, latitude=None, longitude=None, limit=None):
        """Find Costco warehouse locations near a specific latitude and longitude. Returns store details including address, hours, services, and distance."""
        return self._call("get_warehouse_locations", method="GET", latitude=latitude, longitude=longitude, limit=limit)

    def get_savings_deals(self, rows=None, start=None):
        """Retrieve current savings and promotional offers. Returns products with active discounts and deals."""
        return self._call("get_savings_deals", method="GET", rows=rows, start=start)

    def get_gold_and_precious_metals(self, rows=None, start=None):
        """Search specifically for gold bars, silver coins, and precious metals available on Costco.com."""
        return self._call("get_gold_and_precious_metals", method="GET", rows=rows, start=start)

    def get_pharmacy_medications(self, query=None, rows=None, start=None):
        """Browse vitamins, supplements, and health products available on Costco.com. Searches the health and pharmacy product categories."""
        return self._call("get_pharmacy_medications", method="GET", query=query, rows=rows, start=start)


if __name__ == "__main__":
    client = ParseClient()

    result = client.search_products(query="<Search keyword (e.g., 'televis>", rows="<Number of results per page>", start="<Pagination offset (0-based)>", sort_by="<Sort order: price_low_high, pr>")
    print("search_products:", result)

    result = client.get_category_listing(category_path="<Category URL path (e.g., '/tel>", rows="<Number of results per page>", start="<Pagination offset (0-based)>")
    print("get_category_listing:", result)

    result = client.get_product_details(item_numbers="<Comma-separated item numbers f>")
    print("get_product_details:", result)

    result = client.get_product_reviews(product_id="<Costco catalog product ID (gro>", limit="<Number of reviews per page>", offset="<Pagination offset>")
    print("get_product_reviews:", result)

    result = client.get_warehouse_locations(latitude="<Latitude coordinate>", longitude="<Longitude coordinate>", limit="<Maximum number of locations to>")
    print("get_warehouse_locations:", result)

    result = client.get_savings_deals(rows="<Number of results per page>", start="<Pagination offset (0-based)>")
    print("get_savings_deals:", result)

    result = client.get_gold_and_precious_metals(rows="<Number of results per page>", start="<Pagination offset (0-based)>")
    print("get_gold_and_precious_metals:", result)

    result = client.get_pharmacy_medications(query="<Search keyword for health/phar>", rows="<Number of results per page>", start="<Pagination offset (0-based)>")
    print("get_pharmacy_medications:", result)
All endpoints · 8 totalmissing one? ·

Search for products by keyword with pagination and sorting. Returns product listings with pricing, ratings, images, and availability information.

Input
ParamTypeDescription
rowsintegerNumber of results per page
queryrequiredstringSearch keyword (e.g., 'television', 'organic coffee')
startintegerPagination offset (0-based)
sort_bystringSort order: price_low_high, price_high_low, top_rated, best_match
Response
{
  "type": "object",
  "fields": {
    "facets": "object containing available filter facets (price, brand, category, ratings)",
    "fusion": "object with query metadata (requestedSort, fusionQueryId)",
    "response": "object containing docs array of product listings and numFound total count"
  },
  "sample": {
    "data": {
      "facets": {
        "Brand_attr": {
          "buckets": []
        },
        "item_location_pricing_salePrice": {
          "buckets": []
        }
      },
      "fusion": {
        "fusionQueryId": "sAqzOBh5Lv",
        "requestedSort": "item_location_pricing_salePrice asc"
      },
      "response": {
        "docs": [
          {
            "image": "https://bfasset.costco-static.com/...",
            "item_name": "TCL 55\" Class - Q77K Series - 4K UHD QLED Smart TV",
            "item_number": "9555677",
            "item_ratings": 4.5,
            "item_location_pricing_salePrice": 329.99
          }
        ],
        "start": 0,
        "numFound": 171
      }
    },
    "status": "success"
  }
}

About the Costco API

Product Search and Category Browsing

The search_products endpoint accepts a required query string plus optional rows, start, and sort_by parameters (price_low_high, price_high_low, top_rated, best_match). It returns a response object containing a docs array of product listings and a numFound count, alongside a facets object that groups available filters by price, brand, category, and ratings. The get_category_listing endpoint works identically but is driven by a category_path string such as /televisions.html or /grocery-household.html instead of a keyword.

Product Details and Member Reviews

get_product_details takes one or more item numbers (comma-separated, sourced from search result docs) and returns data.products.catalogData, which includes itemNumber, priceData, description, attributes, and additionalFieldData per item. Reviews are retrieved separately through get_product_reviews, which requires the product_id — specifically the group_id field from search results, not the item_number. Review objects include Rating, Title, ReviewText, and UserNickname, along with a TotalResults count and an Includes object covering related authors, products, and comments.

Warehouse Locations and Deals

get_warehouse_locations accepts latitude and longitude coordinates and an optional limit, returning a salesLocations array with fields for salesLocationId, name, distance, address, phone, hours, and services. The get_savings_deals endpoint surfaces products with active discounts using the same docs/numFound/facets response shape as general search. Two additional focused endpoints — get_gold_and_precious_metals and get_pharmacy_medications — query specific product verticals and share the same response structure, with get_pharmacy_medications accepting an optional query parameter for keyword filtering within health categories.

Reliability & maintenance

The Costco API is a managed, monitored endpoint for costco.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when costco.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 costco.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?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Monitor price changes on specific items by polling get_product_details with tracked item numbers and comparing priceData over time.
  • Build a Costco deal aggregator by paginating through get_savings_deals and filtering the returned docs by discount depth or category.
  • Find the nearest Costco warehouse with available services by querying get_warehouse_locations with a user's GPS coordinates.
  • Aggregate member sentiment on a product category by retrieving reviews via get_product_reviews and analyzing Rating and ReviewText fields.
  • Populate a price-comparison tool with Costco listings by running search_products queries and extracting pricing and availability from response.docs.
  • Track Costco's precious metals inventory and spot-price positioning by polling get_gold_and_precious_metals at regular intervals.
  • Filter and display health supplement options by querying get_pharmacy_medications with keywords like 'probiotic' or 'vitamin D' and surfacing facets for user filtering.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Costco have an official public developer API?+
No. Costco does not publish a public developer API or offer API keys for third-party use. This Parse API provides structured access to Costco.com data without requiring a Costco developer account.
What is the difference between `product_id` and `item_number`, and which does `get_product_reviews` use?+
item_number is the SKU-level identifier returned in search result docs and used by get_product_details. product_id for reviews corresponds to the group_id field in search results — a catalog-level identifier that may group multiple item variants. get_product_reviews requires group_id, not item_number; passing an item_number will not return results.
Does the API return in-warehouse stock levels or only online availability?+
The product endpoints return availability information as present in the product listing data, but warehouse-level real-time inventory by location is not currently exposed as a distinct field. get_warehouse_locations returns services per store but not per-SKU stock. You can fork this API on Parse and revise it to add an endpoint targeting warehouse-specific inventory if that data surface is available.
Can I filter `get_product_reviews` by star rating or date?+
The endpoint accepts limit and offset for pagination but does not currently expose sort or filter parameters for rating value or review date. The full TotalResults count and paginated Results array are returned; client-side filtering on Rating is possible with the returned data. You can fork this API on Parse and revise the endpoint to add server-side rating or date filters if the underlying data surface supports them.
Does the API cover Costco's travel, auto-buying, or services offerings?+
Not currently. The 8 endpoints cover merchandise product search and details, member reviews, warehouse locations, savings deals, precious metals, and pharmacy/health products. Costco Travel, the auto program, and non-merchandise services are not included. You can fork this API on Parse and revise it to add endpoints for those verticals.
Page content last updated . Spec covers 8 endpoints from costco.com.
Related APIs in EcommerceSee all →
costcobusinessdelivery.com API
Search and browse Costco Business Delivery products by category or keyword to find pricing, specifications, and availability for bulk purchases. Locate nearby Costco Business warehouses and filter results by product attributes to compare options and make informed buying decisions.
amazon.com API
Search and browse Amazon products, reviews, offers, and deals, then manage your shopping cart all through a single integration. Get detailed product information, seller profiles, and best sellers to compare prices and make informed purchasing decisions.
cos.com API
Search and browse COS fashion products by name or category to instantly access pricing, product images, and direct links to items. Retrieve detailed information about specific products including descriptions, availability, and pricing to compare styles and make informed shopping decisions.
corsair.com API
Search and filter Corsair's gaming peripherals and PC components catalog by keywords, category, and product attributes like price and specs. Browse detailed product information, compare options, and easily navigate through results with sorting and pagination to find exactly what you need.
sephora.com API
Search and browse Sephora's product catalog to find detailed information about beauty items, including specifications, customer reviews, Q&A discussions, pricing, and real-time availability. Filter products by category or brand, and access comprehensive brand listings to discover exactly what you're looking for.
lowes.com API
Search and browse products from Lowe's, including product listings by category, detailed product information, and pricing. Retrieve comprehensive details on specific items to compare options and make informed purchasing decisions.
instacart.com API
Search for grocery products across multiple retailers, view store locations and availability, and access detailed product information including prices and descriptions. Find the best deals and nearest stores offering the items you need.
petco.com API
Browse and search the Petco product catalog, retrieve product details and customer reviews, get search suggestions, find nearby store locations, and discover current deals and promotions.