# Search products

Search Product Hunt for products by keyword and return matched product listings.

- Platform: [Product Hunt](https://docs.upscrape.com/docs/platforms/producthunt)
- Capability ID: `producthunt.search`
- 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 $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "query": "ai writing assistant"
  },
  "capability": "producthunt.search"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | `integer` | No | Source search result page (default 1); pass next_page to resume From 1 to 1000. |
| `query` | `string` | Yes | Free-form search query |

### Example input

```json
{
  "query": "ai writing assistant"
}
```

## 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 example shows one response. Values and optional fields vary with the data available.

```json
{
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "products": [
    {
      "id": "526014",
      "logo_url": "https://ph-files.imgix.net/e1d2a77c-afed-47b6-af24-133df1d4dbde.png?auto=format&fit=crop&h=240&w=240",
      "name": "/ai",
      "reviews_count": 2,
      "reviews_rating": 5,
      "slug": "ai-4",
      "tagline": "Access ChatGPT anywhere you type '/ai'",
      "url": "https://www.producthunt.com/products/ai-4"
    },
    {
      "id": "111412",
      "name": "n8n",
      "slug": "n8n-io",
      "tagline": "Workflow automation for technical people",
      "url": "https://www.producthunt.com/products/n8n-io"
    },
    {
      "id": "106850",
      "name": "Supabase",
      "slug": "supabase",
      "tagline": "The open source Firebase alternative",
      "url": "https://www.producthunt.com/products/supabase"
    }
  ],
  "query": "ai writing assistant",
  "total": 23
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `has_more` | `boolean` | true |
| `next_page` | `integer` | 2 |
| `page` | `integer` | 1 |
| `products` | `array` | 3 items |
| `products` | `array` | 3 items |
| `query` | `string` | ai writing assistant |
| `total` | `integer` | 23 |

## 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)
