# getTopProducts

**Identifier:** `producthunt_getTopProducts`

**Provider:** [Product Hunt](https://kirha.com/providers/producthunt.md)

Get top products from Product Hunt sorted by votes, ranking, newest, or featured date. Use postedAfter with today's date to get "top products today". Filter by featured status or topic.

## Run it with the CLI

```bash
kirha tools run producthunt_getTopProducts \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "producthunt_getTopProducts",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "after": {
      "description": "Cursor for pagination",
      "type": "string"
    },
    "featured": {
      "description": "Filter to featured products only",
      "type": "boolean"
    },
    "first": {
      "default": 20,
      "description": "Number of results (max 20)",
      "maximum": 20,
      "minimum": 1,
      "type": "number"
    },
    "order": {
      "default": "VOTES",
      "description": "Sort order: VOTES, RANKING, NEWEST, or FEATURED_AT",
      "type": "string"
    },
    "postedAfter": {
      "description": "ISO 8601 datetime - use today's date for 'top today'",
      "type": "string"
    },
    "postedBefore": {
      "description": "ISO 8601 datetime",
      "type": "string"
    },
    "topic": {
      "description": "Topic slug to filter by",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "pageInfo": {
      "additionalProperties": false,
      "properties": {
        "endCursor": {
          "type": "string"
        },
        "hasNextPage": {
          "type": "boolean"
        }
      },
      "required": [
        "hasNextPage"
      ],
      "type": "object"
    },
    "products": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "commentsCount": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "featuredAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "makers": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "headline": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "username"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "reviewsCount": {
            "type": "number"
          },
          "reviewsRating": {
            "type": "number"
          },
          "slug": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "thumbnail": {
            "additionalProperties": false,
            "properties": {
              "url": {
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          },
          "topics": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "slug"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          },
          "votesCount": {
            "type": "number"
          },
          "website": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "tagline",
          "url",
          "votesCount",
          "commentsCount",
          "createdAt",
          "topics",
          "makers"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "totalCount": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "totalCount",
    "pageInfo",
    "products"
  ],
  "type": "object"
}
```

-----

[All Product Hunt tools](https://kirha.com/providers/producthunt.md) · [< Back to tools list](https://kirha.com/tools.md)