Ecommerce
Costco logo

Costco API

costco.com

Search products, fetch product details and pricing, locate warehouses, read warehouse details and gas prices, and browse Costco categories.

Actions
7
Category
Ecommerce
Login
Not required
Output
JSON

Call the Costco API

Submit a task, then poll the job until it settles. This example runs co_category_browse.

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: $ANAKIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "co_category_browse",
    "params": {
      "category_slug": "<category_slug>"
    }
  }'

7 actions on costco.com

Read

  • Category Browse

    co_category_browseread1 credit / call

    Browse Costco products for a category slug with pagination, pricing, availability, and filters.

    category_slug
    string · required
    postal_code
    string
    state
    string
    warehouse_id
    string
    page_size
    integer
    page
    integer
    order_by
    string
  • Category Sitemap

    co_category_sitemapread1 credit / call

    Fetch the Costco category tree with department slugs and subcategory slugs.

    department
    string
  • Gas Prices

    co_gas_pricesread1 credit / call

    Fetch current gas prices for one or more Costco warehouses and return regular, premium, and optional diesel prices.

    warehouse_numbers
    array · required
  • Product Details

    co_product_detailsread1 credit / call

    Fetch full Costco product metadata from the product page, with optional live pricing for a warehouse.

    product_id
    string
    url
    string
    warehouse_number
    string
  • Search Products

    co_search_productsread1 credit / call

    Search Costco products by keyword with pricing, availability, ratings, and available filters.

    query
    string · required
    postal_code
    string
    state
    string
    warehouse_id
    string
    page_size
    integer
    page
    integer
    order_by
    string
    filter_by
    array
  • Warehouse Details

    co_warehouse_detailsread1 credit / call

    Fetch complete details for a Costco warehouse including address, hours, service details, holidays, and feature flags.

    warehouse_number
    string · required
  • Warehouse Locator

    co_warehouse_locatorread1 credit / call

    Find Costco warehouses near a location and return warehouse numbers, address details, hours, services, and distance.

    query
    string · required
    limit
    integer
    service
    string

Costco API questions

Is there an API for Costco?
Costco does not offer a public data API for this, but Anakin Wire provides 7 maintained endpoints for costco.com. You call Anakin's REST API with an action ID and parameters and get structured JSON back; Anakin handles the browser, proxies, anti-bot, and parsing.
How do I scrape Costco data?
POST to https://api.anakin.io/v1/wire/task with your API key, the action ID, and its parameters, then poll GET /v1/wire/jobs/{id} until the job settles. There is nothing to install and no scraper to maintain — when costco.com changes its markup, Anakin updates the action.
Do I need a Costco account?
No. Every Costco action listed here runs anonymously — no account and no credentials required.
What does the Costco API cost?
Usage-based credits, charged per call and refunded automatically when a job fails. New accounts start with 300 free credits and no card. See anakin.io/pricing for the current rates.

More Ecommerce APIs

All Ecommerce sites