get_posts
Retrieve and filter Product Hunt posts by topic, date, URL, Twitter URL, and more. Sort by ranking, votes, or newest, and paginate results efficiently.
Instructions
Retrieve a list of Product Hunt posts with various filtering and sorting options.
Parameters:
- featured (bool, optional): Only return featured posts if True.
- topic (str, optional): Filter by topic slug.
- order (str, optional): Sorting order. Valid values: RANKING (default), NEWEST, VOTES, FEATURED_AT.
- count (int, optional): Number of posts to return (default: 10, max: 20).
- after (str, optional): Pagination cursor for next page.
- url (str, optional): Filter posts by URL.
- twitter_url (str, optional): Filter posts by Twitter URL.
- posted_before (str, optional): ISO datetime to filter posts posted before this date.
- posted_after (str, optional): ISO datetime to filter posts posted after this date.
Returns:
- success (bool)
- data (dict): If successful, contains:
- posts (list): List of post objects (id, name, description, etc.)
- pagination (dict): { end_cursor, has_next_page }
- error (dict, optional)
- rate_limits (dict)
Notes:
- This is not a keyword search; use filters to narrow results.
- If no posts match, `posts` will be an empty list.
- Invalid date formats return a user-friendly error.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
after | No | ||
count | No | ||
featured | No | ||
order | No | RANKING | |
posted_after | No | ||
posted_before | No | ||
topic | No | ||
twitter_url | No | ||
url | No |
Input Schema (JSON Schema)
{
"properties": {
"after": {
"default": null,
"title": "After",
"type": "string"
},
"count": {
"default": 10,
"title": "Count",
"type": "integer"
},
"featured": {
"default": null,
"title": "Featured",
"type": "boolean"
},
"order": {
"default": "RANKING",
"title": "Order",
"type": "string"
},
"posted_after": {
"default": null,
"title": "Posted After",
"type": "string"
},
"posted_before": {
"default": null,
"title": "Posted Before",
"type": "string"
},
"topic": {
"default": null,
"title": "Topic",
"type": "string"
},
"twitter_url": {
"default": null,
"title": "Twitter Url",
"type": "string"
},
"url": {
"default": null,
"title": "Url",
"type": "string"
}
},
"title": "get_postsArguments",
"type": "object"
}