Costco API: Find nearby warehouses
Finds the US Costco warehouses nearest a city, address or ZIP code, with today's and weekly hours, gas station hours, services and posted gas prices.
Unofficial. Not affiliated with or endorsed by Costco.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Location, required
location City, street address, or ZIP code to search near, such as Kirkland, WA.
Kirkland, WA
- Max Results optional
max_results Maximum number of nearest warehouses to return, for example 5.
5
Whole number from 1 to 20. Default
5.
Input as JSON
{ "location": "Kirkland, WA", "max_results": 5}Output
{ "warehouses": [ { "phone": "(425) 827-1693", "address": "8629 120TH AVE NE, KIRKLAND WA 98033-5822", "services": [ "Food Court", "Gas Station", "Hearing Aids" ], "weekly_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM; Executive Member Sat: 9:00 AM - 7:00 PM; Gold Star & Business Member Sat: 9:30 AM - 7:00 PM; Executive Member Sun: 9:00 AM - 6:00 PM; Gold Star & Business Member Sun: 10:00 AM - 6:00 PM", "distance_miles": 1.1, "warehouse_name": "Kirkland Warehouse", "diesel_gas_price": null, "warehouse_number": "8", "gas_station_hours": "Mon-Fri: 6:00 AM - 10:00 PM; Sat: 6:00 AM - 8:30 PM; Sun: 6:00 AM - 7:30 PM", "premium_gas_price": 5.899, "regular_gas_price": 5.499, "gas_price_currency": "USD", "today_opening_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM", "warehouse_page_link": "https://www.costco.com/w/-/wa/kirkland/8" }, { "phone": "(425) 406-5382", "address": "7725 188TH AVE NE, REDMOND WA 98052-6088", "services": [ "Food Court", "Gas Station", "Hearing Aids" ], "weekly_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM; Executive Member Sat: 9:00 AM - 7:00 PM; Gold Star & Business Member Sat: 9:30 AM - 7:00 PM; Executive Member Sun: 9:00 AM - 6:00 PM; Gold Star & Business Member Sun: 10:00 AM - 6:00 PM", "distance_miles": 5.25, "warehouse_name": "Redmond Warehouse", "diesel_gas_price": 7.159, "warehouse_number": "1225", "gas_station_hours": "Mon-Fri: 6:00 AM - 10:00 PM; Sat: 6:00 AM - 8:30 PM; Sun: 6:00 AM - 7:30 PM", "premium_gas_price": 5.999, "regular_gas_price": 5.449, "gas_price_currency": "USD", "today_opening_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM", "warehouse_page_link": "https://www.costco.com/w/-/wa/redmond/1225" }, { "phone": "(425) 806-7700", "address": "24008 SNOHOMISH WOODINVILLE RD, WOODINVILLE WA 98072-9743", "services": [ "Food Court", "Gas Station", "Hearing Aids" ], "weekly_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM; Executive Member Sat: 9:00 AM - 7:00 PM; Gold Star & Business Member Sat: 9:30 AM - 7:00 PM; Executive Member Sun: 9:00 AM - 6:00 PM; Gold Star & Business Member Sun: 10:00 AM - 6:00 PM", "distance_miles": 7.68, "warehouse_name": "Woodinville Warehouse", "diesel_gas_price": 7.399, "warehouse_number": "747", "gas_station_hours": "Mon-Fri: 6:00 AM - 10:00 PM; Sat: 6:00 AM - 8:30 PM; Sun: 6:00 AM - 7:30 PM", "premium_gas_price": 5.899, "regular_gas_price": 5.339, "gas_price_currency": "USD", "today_opening_hours": "Executive Member Mon-Fri: 9:00 AM - 8:30 PM; Gold Star & Business Member Mon-Fri: 10:00 AM - 8:30 PM", "warehouse_page_link": "https://www.costco.com/w/-/wa/woodinville/747" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"costco.com/search_warehouses","input":{"location":"Kirkland, WA","max_results":5}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "costco.com/search_warehouses" , "input": { "location": "Kirkland, WA", "max_results": 5 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "costco.com/search_warehouses" , "input": { "location": "Kirkland, WA", "max_results": 5 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run costco.com/search_warehouses# with {"location":"Kirkland, WA","max_results":5}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string", "minLength": 1, "description": "City, street address, or ZIP code to search near, such as Kirkland, WA." }, "max_results": { "type": "integer", "default": 5, "maximum": 20, "minimum": 1, "description": "Maximum number of nearest warehouses to return, for example 5." } }}Output schema
{ "type": "object", "required": [ "warehouses" ], "properties": { "warehouses": { "type": "array", "items": { "type": "object", "required": [ "warehouse_name", "address", "phone", "distance_miles", "today_opening_hours", "weekly_hours", "gas_station_hours", "regular_gas_price", "premium_gas_price", "diesel_gas_price", "gas_price_currency", "services", "warehouse_page_link", "warehouse_number" ], "properties": { "phone": { "type": [ "string", "null" ] }, "address": { "type": "string" }, "services": { "type": "array", "items": { "type": "string" } }, "weekly_hours": { "type": [ "string", "null" ] }, "distance_miles": { "type": "number" }, "warehouse_name": { "type": "string" }, "diesel_gas_price": { "type": [ "number", "null" ] }, "warehouse_number": { "type": "string" }, "gas_station_hours": { "type": [ "string", "null" ] }, "premium_gas_price": { "type": [ "number", "null" ] }, "regular_gas_price": { "type": [ "number", "null" ] }, "gas_price_currency": { "enum": [ "USD" ], "type": "string" }, "today_opening_hours": { "type": [ "string", "null" ] }, "warehouse_page_link": { "type": "string" } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
costco.com/search_warehouses- Returns
- warehouse name, address, phone, distance, today's and weekly hours, gas hours, regular/premium/diesel prices, services, page link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method costco.com/search_warehouses with the inputs above.
Ask your agent
- What are the closest Costco warehouses to ZIP 80202 and what are their hours today?
- Find me the 3 nearest Costco locations to 1450 Market St, San Francisco, CA, including gas prices for regular and premium.
- Which warehouse stores near Plano, TX have a gas station that sells diesel, and what's the current price per gallon?
- Show up to 10 warehouse club locations around Raleigh, NC with phone numbers, weekly hours, and services like pharmacy or tire center.
- I'm in Scottsdale, AZ — list the nearest Costco stores with distance and what time their gas stations open tomorrow.
See more
Finds Starbucks cafés near a city, address or ZIP code, nearest first, with whether each is open now, today's local hours and amenities; optionally only cafés open now.
starbucks.com/search_storesFinds the AutoZone stores nearest a US ZIP code, city or street address, with contact details, opening hours, whether each is open now, distance and store page links.
autozone.com/search_storesFinds nearby GasBuddy stations for a US or Canadian city, address or postal code and lists their reported prices for a fuel grade, lowest listed price first.
gasbuddy.com/list_cheapest_gas_stationsFinds McDonald's restaurants within 50 miles of a US city, address or ZIP code, nearest first. Each result includes today's hours, services and directions. Open-now status follows the listed hours.
mcdonalds.com/search_restaurantsSearches a named Instacart store's guest-visible grocery products for a US ZIP code. Prices are in USD and can differ from in-store prices; stock estimates can change.
instacart.com/search_productsGets GasBuddy's latest reported average regular gas price, its changes and the diesel benchmark for a US state or a listed metro area. Midgrade, premium and area low/high prices are not published with these averages; updates may lag the current day.
gasbuddy.com/get_average_gas_pricesGets AAA average gasoline and diesel prices for the US, a state, or a metro area listed on its state page, with yesterday, week, month and year-ago comparisons and record highs, as of the date AAA shows.
gasprices.aaa.com/get_gas_pricesChecks a Target product's stock and pickup, drive-up and same-day delivery availability at the stores nearest a US ZIP code.
target.com/check_store_stock