# Instacart API

> Instacart returns grocery products, prices, and stock estimates, available as a workflow and API.

Instacart searches guest-visible grocery products at a named store using a product query and five-digit US delivery ZIP code. Search products returns product names, brands, sizes, prices, and stock estimates for that search.

- Page: https://fous.com/workflows/instacart
- Handle: `@instacart`
- Category: [Commerce](https://fous.com/workflows/category/commerce)
- Source website: https://instacart.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Instacart.

## Methods

### Search products

Operation `search_products`, version 1. 1 credit per call.

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

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `query` | string | yes | `"eggs"` | The grocery product to search for, for example oat milk. |
| `store` | string | yes | `"Costco"` | Store name, for example Safeway or Costco. |
| `zip_code` | string | yes | `"10001"` | Five-digit US delivery ZIP code, for example 94103. |
| `max_results` | integer | no | `5` | Most products to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query",
    "zip_code",
    "store"
  ],
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "The grocery product to search for, for example oat milk.",
      "examples": [
        "eggs",
        "oat milk"
      ]
    },
    "store": {
      "type": "string",
      "minLength": 1,
      "description": "Store name, for example Safeway or Costco.",
      "examples": [
        "Costco",
        "Safeway"
      ]
    },
    "zip_code": {
      "type": "string",
      "pattern": "^[0-9]{5}$",
      "description": "Five-digit US delivery ZIP code, for example 94103.",
      "examples": [
        "10001",
        "94103"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 60,
      "minimum": 1,
      "description": "Most products to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        5
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "eggs",
      "store": "Costco",
      "zip_code": "10001",
      "max_results": 5
    },
    {
      "query": "oat milk",
      "store": "Safeway",
      "zip_code": "94103"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `store` | string | `"Costco"` | Store used for the search. |
| `products` | array |  |  |
| `products[].size` | string or null | `"each"` |  |
| `products[].brand` | string or null | `"Kirkland Signature"` |  |
| `products[].price` | number or null | `10.31` |  |
| `products[].currency` | string | `"USD"` |  |
| `products[].in_stock` | boolean | `true` |  |
| `products[].image_link` | string or null | `"https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_a465d2c7-6689-46db-8c13-ab57499de74f.jpg"` |  |
| `products[].unit_price` | string or null | `"$0.43/ct"` |  |
| `products[].product_link` | string | `"https://www.instacart.com/products/19232685-kirkland-signature-organic-free-range-egg-usda-grade-a-lg-24-ct-24-ct?retai` |  |
| `products[].product_name` | string | `"Kirkland Signature Free-Range Organic Eggs, Large, 24-count"` |  |
| `products[].original_price` | number or null |  |  |

**Example input**

```json
{
  "query": "eggs",
  "store": "Costco",
  "zip_code": "10001",
  "max_results": 5
}
```

**Example output**

```json
{
  "store": "Costco",
  "products": [
    {
      "size": "each",
      "brand": "Kirkland Signature",
      "price": 10.31,
      "currency": "USD",
      "in_stock": true,
      "image_link": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_a465d2c7-6689-46db-8c13-ab57499de74f.jpg",
      "unit_price": "$0.43/ct",
      "product_link": "https://www.instacart.com/products/19232685-kirkland-signature-organic-free-range-egg-usda-grade-a-lg-24-ct-24-ct?retailerSlug=costco",
      "product_name": "Kirkland Signature Free-Range Organic Eggs, Large, 24-count",
      "original_price": null
    },
    {
      "size": "each",
      "brand": "Kirkland Signature",
      "price": 4.71,
      "currency": "USD",
      "in_stock": true,
      "image_link": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_cf27eeda-d364-4b40-b2b2-9b1837ef51e3.jpg",
      "unit_price": null,
      "product_link": "https://www.instacart.com/products/3308878-kirkland-signature-cage-free-eggs-24-ct-24-ct?retailerSlug=costco",
      "product_name": "Kirkland Signature Eggs, Large, 24-count",
      "original_price": null
    },
    {
      "size": "each",
      "brand": "Kirkland Signature",
      "price": 17.4,
      "currency": "USD",
      "in_stock": true,
      "image_link": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_ba13714d-b48d-4901-a35b-97b8f96c609e.jpg",
      "unit_price": "$4.35 each",
      "product_link": "https://www.instacart.com/products/24518529-kirkland-signature-peeled-ready-to-eat-organic-hard-boiled-eggs-2-ct?retailerSlug=costco",
      "product_name": "Kirkland Signature Organic Hard-Boiled Eggs, Cage Free, Peeled, 16-count, 2-pack",
      "original_price": null
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@instacart",
  "visibility": "public",
  "operation": "search_products",
  "version": 1,
  "input": {
    "query": "eggs",
    "store": "Costco",
    "zip_code": "10001",
    "max_results": 5
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@instacart\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_products\",\n  \"version\": 1,\n  \"input\": {\n    \"query\": \"eggs\",\n    \"store\": \"Costco\",\n    \"zip_code\": \"10001\",\n    \"max_results\": 5\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@instacart",
  "visibility": "public",
  "operation": "search_products",
  "version": 1,
  "input": {
    "query": "eggs",
    "store": "Costco",
    "zip_code": "10001",
    "max_results": 5
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@instacart","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare grocery prices across named stores.
- Check estimated product availability for a delivery ZIP code.
- Find product sizes and brands for a grocery query.
- Review product links and images for shopping research.

## FAQ

### Is Fous affiliated with Instacart?

No. Fous is not affiliated with Instacart. This workflow reads the public instacart.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Instacart account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from instacart.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What does a grocery product cost at a store?

Search products returns product prices in USD for the named store and ZIP code; prices can differ from in-store prices.

### Is a grocery product estimated to be in stock?

Search products returns stock estimates for matching products, which can change.

### Which brands and sizes match a grocery search?

Search products returns matching product brands and sizes for the query, store, and ZIP code.

## Related

- [Walmart API](https://fous.com/workflows/walmart.md): Walmart helps shoppers find products from Walmart and marketplace sellers, view details, prices, ratings and reviews; availability uses Walmart’s default location, not ZIP codes.
- [Costco API](https://fous.com/workflows/costco.md): Costco returns US product prices/details and warehouse hours/services/gas prices; delivery affects availability, member prices may be hidden, and posted gas and holiday hours may differ.
- [Aldi API](https://fous.com/workflows/aldi.md): Search groceries and prices at ALDI US.
- [Trader Joe's API](https://fous.com/workflows/trader-joes.md): Trader Joe's groceries, beverages, flowers, plants, and other products.
- [Nordstrom API](https://fous.com/workflows/nordstrom.md): Search clothing, shoes, and beauty products at Nordstrom.
- [Tesco API](https://fous.com/workflows/tesco.md): Search Tesco groceries, prices, and promotions.
- [Target API](https://fous.com/workflows/target.md): Target helps shoppers find products, details, photos, ratings, links, current prices, and nearby-store stock and pickup or delivery availability; prices and availability can change by location and time.
- [Macy's API](https://fous.com/workflows/macys.md): Shop Macy's products and sales.
- [All Commerce workflows](https://fous.com/workflows/category/commerce)
