# Rappi Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/rappi/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/rappi-search | ## Description Search Rappi Mexico on rappi.com.mx. The city resolves to Mexico City. Each row is one store offer, and next is null. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/rappi/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Leche in Mexico City ```json { "results": [ { "eta": "9 - 12 min", "url": "https://www.rappi.com.mx/p/santa-clara-leche-deslactosada-semidescremada-1-l-14069", "name": "Santa Clara Leche Deslactosada Semidescremada 1 L", "image": "https://images.rappi.com.mx/products/40efda20-78c9-4351-b9e1-a860ab740866.png?e=webp&q=80&d=130x130", "price": 35.9, "currency": "MXN", "in_stock": true, "store_id": 1923301762, "store_url": "https://www.rappi.com.mx/tiendas/1923301762", "unit_type": "l", "product_id": "2109993478", "store_name": "Turbo Fresh-Angel Independencia", "unit_price": "0.0359/ml", "has_discount": false, "price_display": "$35.90", "shipping_cost": 25, "original_price": null, "store_promotion": "Hasta 42% Off", "has_free_shipping": false, "master_product_id": 14069 } ], "pagination": { "next": null, "page": 1, "per_page": 208, "total_pages": null, "total_results": null } } ``` ## Documentation ## Overview Search Rappi Mexico. The storefront is rappi.com.mx and the site resolves the city to Ciudad de México. Other country domains return 400. ``` GET https://api.piloterr.com/v2/rappi/search?query=leche ``` Header: `x-api-key`. Each row is one store's offer for a product. The same product can appear several times, once per store. `product_id` can repeat. The pair `product_id` plus `store_id` does not. The payload has no next page, so `pagination.next` is null. `page` greater than 1 returns 404. `price` is a number in MXN and `price_display` is the same amount with a dollar sign and two decimals, for example `35.9` and `$35.90`. The product page can show a different price because its primary store is not the store on this card. ## Parameters `query` is required. Example: `leche`. A Mexico search URL also works: `https://www.rappi.com.mx/search?query=leche`. A product URL is rejected here. `page` is optional. Only page 1 returns rows. Example: `1`. ## Response fields `product_id` is the store listing id. `master_product_id` is the catalog id, for example `14069` for this Santa Clara milk. `name` is the product name. `url` is the product page on rappi.com.mx. Open that URL on `/v2/rappi/product`. `price` is a number. `price_display` matches it, for example `$35.90`. `currency` is `MXN`. `original_price` is the pre-discount amount when `has_discount` is true, otherwise null. `has_discount` and `in_stock` are booleans. `unit_type` is a short unit such as `l`. `unit_price` is the site's unit string, for example `0.0359/ml`. `image` is a product image. `store_id`, `store_name`, and `store_url` identify the store. `eta` is a delivery window such as `9 - 12 min`. `shipping_cost` is a number. `has_free_shipping` is a boolean. `store_promotion` is the store banner text, or null. ## Pagination `pagination.page` is 1. `pagination.per_page` is the number of rows in this response. For `leche` that was 208. `pagination.total_results` and `pagination.total_pages` are null. `pagination.next` is null because the payload has no next page. There is nothing to request as page 2. ## Use cases - A CPG brand compares Santa Clara milk prices across Mexico City stores in one response, using `master_product_id` 14069. - A dark-store operator keeps rows with `in_stock` true and reads `eta` and `shipping_cost`. - A price monitor stores `product_id` together with `store_id`, because the same carton is listed by many stores. ## Error codes - 400: empty `query`, a product URL, or a Rappi host other than rappi.com.mx. - 404: no products, or `page` greater than 1. - 401: missing API key.