Amazon Fresh Filtering API

The filter links Amazon Fresh shows for a search are in filters. To apply one, pass its rh value in the rh parameter, or follow its serpapi_link. To combine filters, separate their rh values with a comma (,).

The API endpoint is https://serpapi.com/search?engine=amazon_fresh

Head to the playground for a live and interactive demo.

API parameters

rh

Optional

Parameter defines items filtering based on their attributes. The structure is a list of key:value pairs separated by ,.

For example n:16318981,p_n_program_participation:17428820011 to filter for products in the Fresh Fruits department (n:16318981) that are SNAP EBT Eligible (p_n_program_participation:17428820011) on amazon.com. Use p_36:<min>-<max> for a price range, with prices multiplied by 100 (e.g., p_36:300-500 for $3.00 to $5.00).

Available filters depend on the query and are returned in filters, along with a serpapi_link to apply each of them.

node

Optional

Parameter defines the Amazon Fresh department to browse without a search query. For example, 16318981 for Fresh Fruits on amazon.com. Department IDs are the n: values in filters.department[].rh (e.g., n:16318981). To switch departments while browsing, change node or follow the department's serpapi_link: Amazon ignores departments in rh while node is set.

This parameter can't be used with the k parameter.

API examples

Example results for k: yogurt

Each filter has the rh value and the serpapi_link that apply it at the same delivery location.

Example results for k: yogurt

JSON Example

{
  ...
  "filters": {
    "brands": [
      {
        "position": 1,
        "name": "Chobani",
        "rh": "p_123:336771",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_123%3A336771&dc&qid=1792180595&rnid=85457740011&ref=sr_nr_p_123_1&ds=v1%3AWmH8tqEVIuUn5dbsDY0loiBNHG1LG2XMXEH7c8cZXn4",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_123%3A336771"
      },
      {
        "position": 2,
        "name": "siggi's",
        "rh": "p_123:647005",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_123%3A647005&dc&qid=1792180595&rnid=85457740011&ref=sr_nr_p_123_2&ds=v1%3AL7ggE6lD9oFmXbIQnsgxZmiG6JqsU4fuQLvVaj%2BAlcE",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_123%3A647005"
      },
      ...
    ],
    "customer_reviews": [
      {
        "position": 1,
        "name": "4 Stars & Up",
        "rh": "p_72:1248897011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_72%3A1248897011&dc&qid=1792180595&rnid=1248895011&ref=sr_nr_p_72_1&ds=v1%3A3W%2FPs81EH4uP%2B%2Fpcz8PCq%2FOJDCYjaqmU28GAlZHLEBs",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_72%3A1248897011"
      }
    ],
    "dairy_specialty": [
      {
        "position": 1,
        "name": "Organic",
        "rh": "p_n_g-1004228310091:17035080011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_n_g-1004228310091%3A17035080011&dc&qid=1792180595&rnid=17035075011&ref=sr_nr_p_n_g-1004228310091_1&ds=v1%3AJQ69p3PcXu7v8Y0a1vt32toQ6eJlyMyDKp%2BC4NLvv%2F4",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_n_g-1004228310091%3A17035080011"
      },
      {
        "position": 2,
        "name": "Lactose-Free",
        "rh": "p_n_g-1004228310091:17035077011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_n_g-1004228310091%3A17035077011&dc&qid=1792180595&rnid=17035075011&ref=sr_nr_p_n_g-1004228310091_2&ds=v1%3ABnedP9f1%2FsTHwkezx09r90H5MCSqfG3IMkfG6fAbD%2Bg",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_n_g-1004228310091%3A17035077011"
      }
    ],
    "top_brands_in_grocery": [
      {
        "position": 1,
        "name": "Top Brands",
        "rh": "p_n_g-101014971069111:119653281011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_n_g-101014971069111%3A119653281011&dc&qid=1792180595&rnid=119653280011&ref=sr_nr_p_n_g-101014971069111_1&ds=v1%3A3oe9T0V7BNEsd3olNSYPcPcwFjfbb%2BteizKTIRVJg90",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_n_g-101014971069111%3A119653281011"
      }
    ],
    "snap_ebt": [
      {
        "position": 1,
        "name": "SNAP EBT Eligible",
        "rh": "p_n_program_participation:17428820011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_n_program_participation%3A17428820011&dc&qid=1792180595&rnid=17428819011&ref=sr_nr_p_n_program_participation_1&ds=v1%3AtfnaamwgIRPlEJ2LO1GJWgkBKZ7dHv8fZeMJdGH6QXI",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_n_program_participation%3A17428820011"
      }
    ],
    ...
  },
  ...
}

Example with rh: p_72:1248897011,p_36:300-600 for yogurt rated 4 stars and up from $3 to $6

p_72:1248897011 is the 4 Stars & Up filter from filters.customer_reviews, and p_36:300-600 is a price range from $3.00 to $6.00, with prices multiplied by 100. Applied filters have used: true.

Example with rh: p_72:1248897011,p_36:300-600 for yogurt rated 4 stars and up from $3 to $6

JSON Example

{
  "search_parameters": {
    "engine": "amazon_fresh",
    "k": "yogurt",
    "amazon_domain": "amazon.com",
    "delivery_zip": "10001",
    "rh": "p_72:1248897011,p_36:300-600",
    "device": "desktop"
  },
  "search_information": {
    "total_results": 82,
    "query_displayed": "yogurt",
    "store": "amazonfresh",
    "page": 1
  },
  "organic_results": [
    {
      "position": 1,
      "asin": "B0D7J7595Z",
      "title": "365 By Whole Foods Market, Greek Yogurt, Plain Nonfat, 32 Ounce",
      "link_clean": "https://www.amazon.com/365-Whole-Foods-Market-Nonfat/dp/B0D7J7595Z/",
      "rating": 4.7,
      "reviews": 2800,
      "price": "$5.29",
      "extracted_price": 5.29,
      "price_unit": "$0.17/ounce",
      "extracted_price_unit": 0.17
    },
    {
      "position": 2,
      "asin": "B07JZX58VM",
      "title": "Chobani® Low-Fat Vanilla Greek Yogurt, Mixed Berry on the Bottom 5.3oz 4-pack",
      "link_clean": "https://www.amazon.com/Chobani-Vanilla-Yogurt-Bottom-4-pack/dp/B07JZX58VM/",
      "rating": 4.8,
      "reviews": 5400,
      "price": "$4.67",
      "extracted_price": 4.67,
      "price_unit": "$4.67/count",
      "extracted_price_unit": 4.67
    },
    ...
  ],
  "filters": {
    "customer_reviews": [
      {
        "position": 1,
        "name": "4 Stars & Up",
        "rh": "p_72:1248897011",
        "link": "https://www.amazon.com/s?k=yogurt&i=amazonfresh&bbn=10329849011&rh=n%3A10329849011%2Cp_36%3A300-600&dc&qid=1792180646&rnid=1248895011&ref=sr_nr_p_72_1&ds=v1%3AY15VwBnQWNIEG4hmwr5A6ahr8CVJTfoY2BTDysj7JbU",
        "serpapi_link": "https://serpapi.com/search.json?amazon_domain=amazon.com&delivery_zip=10001&device=desktop&engine=amazon_fresh&k=yogurt&rh=n%3A10329849011%2Cp_36%3A300-600",
        "used": true
      }
    ],
    ...
  },
  ...
}

JSON structure overview

{
  ...
  "filters": {
    "snake_case name of the filter group (e.g., 'customer_reviews')": [
      {
        "position": "Integer - Position of the filter in its group",
        "name": "String - Filter name (e.g., '4 Stars & Up')",
        "description": "String - Filter description",
        "image": "String - Filter image URL",
        "rh": "String - Value for the 'rh' parameter (e.g., 'p_72:1248897011')",
        "link": "String - Link to the Amazon Fresh search with the filter",
        "serpapi_link": "String - SerpApi link to the search with the filter, at the same delivery location",
        "used": "Boolean - Whether the filter is applied"
      },
      ...
    ],
    ...
  },
  ...
}