Skip to content
Scrappa Get API key
Instacart API 1 credit / request

Instacart Search API Documentation

GET https://scrappa.co/api/instacart/search

Instacart Search API searches grocery products. An optional zip must be a supported ZIP (currently 10016) or the request answers 422. The zip is a validity gate, not a price filter, and is not echoed back. With retailer, a free empty result reports retailer_status of no_priced_rows or unknown_retailer. Each item has the name, brand, size, current price, regular and sale price when on sale, unit price, availability, a full-size image URL and the retailer and shop ids.

Search returns the first page only. Instacart has no page cursor, so page accepts only 1; a higher page answers 422. Send retailer to scope results to that retailer; rows are kept by retailer and shop id, not by slug text. Prices are numbers in US dollars. Use the item id with the product route for full detail. Costs 1 credit per successful request with results. A search without hits and failed requests are free and report 0 credits.

Instacart Search API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/instacart/search
Auth header
x-api-key
Cost
1 credit / request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "page": 1,
        "count": 1,
        "items": [
            {
                "id": "items_88059-20630136",
                "url": "https://www.instacart.com/products/20630136-organic-whole-milk?retailerSlug=safeway",
                "name": "Organic Whole Milk",
                "size": "1 gal",
                "unit": "fl oz",
                "brand": "Safeway",
                "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_example.jpeg",
                "price": 3.44,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

3 optional filters available.

query string Required

Search text, 1 to 120 characters, for example milk.

Example value coffee shops
zip string Optional

Optional supported US ZIP (currently 10016); validity gate only, not echoed back

Example value example
retailer string Optional

Retailer slug to scope results, for example safeway.

Example value example
page integer Optional

Only 1 is available (default 1). Any other value answers 422.

Example value 1

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "page": 1,
        "count": 1,
        "items": [
            {
                "id": "items_88059-20630136",
                "url": "https://www.instacart.com/products/20630136-organic-whole-milk?retailerSlug=safeway",
                "name": "Organic Whole Milk",
                "size": "1 gal",
                "unit": "fl oz",
                "brand": "Safeway",
                "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_example.jpeg",
                "price": 3.44,
                "shop_id": "37447",
                "currency": "USD",
                "discount": 0.55,
                "position": 1,
                "product_id": "20630136",
                "sale_price": 3.44,
                "unit_price": 0.03,
                "retailer_id": 118,
                "availability": "in_stock",
                "regular_price": 3.99,
                "unit_price_text": "$0.03/fl oz"
            }
        ],
        "query": "milk",
        "retailer": "safeway",
        "has_next_page": false
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter is missing or invalid, for example page above 1. This response is not billable.

{
    "errors": {
        "page": [
            "Only page 1 is available. Instacart search has no page cursor."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

Instacart could not be reached. This response is not billable. Retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Instacart could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.