# Search supplier listings

Search public IndiaMART directory listings by product and optional city with bounded pagination.

- Platform: [IndiaMART Directory](https://docs.upscrape.com/docs/platforms/indiamart)
- Capability ID: `indiamart.search.listings`
- Cost: 1 credit per request
- Maximum runtime: 60 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "city": "Mumbai",
    "max_pages": 1,
    "page": 1,
    "query": "industrial water pump"
  },
  "capability": "indiamart.search.listings"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | `string` | No | Optional Indian city used by IndiaMART's public search filter. |
| `max_pages` | `integer` | No | Maximum consecutive result pages to fetch. |
| `page` | `integer` | No | One-based starting result page. |
| `query` | `string` | Yes | Product or service to find in IndiaMART's public directory. |

### Example input

```json
{
  "city": "Mumbai",
  "max_pages": 1,
  "page": 1,
  "query": "industrial water pump"
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This redacted fixture is an example, not a fixed response schema.

```json
{
  "city": "Mumbai",
  "has_more": true,
  "listings": [
    {
      "company_name": "",
      "gst_verified": false,
      "page": 1,
      "position": 1,
      "product_title": "50 Meter Steel Industrial Water Pump, For Chemical Dosing, 2 HP",
      "product_url": "https://export.indiamart.com/products/?id=2853215603088",
      "trustseal_verified": false
    },
    {
      "company_name": "Chemical Pumps & Projects",
      "gst_verified": false,
      "page": 1,
      "position": 2,
      "product_title": "",
      "storefront_url": "https://export.indiamart.com/company/22940274/",
      "trustseal_verified": false
    },
    {
      "company_name": "",
      "gst_verified": false,
      "page": 1,
      "position": 3,
      "product_title": "20 Meter Stainless Steel Horizontal Pump, For Industrial, 3 HP ₹ 25,500",
      "product_url": "https://export.indiamart.com/products/?id=2853953435073",
      "trustseal_verified": false
    }
  ],
  "pages_fetched": 1,
  "query": "industrial water pump",
  "url": "https://dir.indiamart.com/search.mp?cq=Mumbai&prdsrc=1&ss=industrial+water+pump"
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `city` | `string` | Mumbai |
| `has_more` | `boolean` | true |
| `listings` | `array` | 3 items |
| `listings` | `array` | 3 items |
| `pages_fetched` | `integer` | 1 |
| `query` | `string` | industrial water pump |
| `url` | `string` | https://dir.indiamart.com/search.mp?cq=Mumbai&prdsrc=1&ss=industrial+wa… |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
