get_collections
Retrieve filtered and paginated collections from Product Hunt, specifying criteria like featured status, user ID, post ID, sorting order, and result count.
Instructions
Retrieve a list of collections with optional filters.
Parameters:
- featured (bool, optional): Only return featured collections if True.
- user_id (str, optional): Filter to collections created by this user ID.
- post_id (str, optional): Filter to collections that include this post ID.
- order (str, optional): Sorting order. Valid values: FOLLOWERS_COUNT (default), NEWEST.
- count (int, optional): Number of collections to return (default: 10, max: 20).
- after (str, optional): Pagination cursor for next page.
Returns:
- success (bool)
- data (dict): If successful, contains:
- collections (list): List of collection objects (id, name, etc.)
- pagination (dict): { end_cursor, has_next_page }
- error (dict, optional)
- rate_limits (dict)
Notes:
- If no collections match, `collections` will be an empty list.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
after | No | ||
count | No | ||
featured | No | ||
order | No | FOLLOWERS_COUNT | |
post_id | No | ||
user_id | 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": "FOLLOWERS_COUNT",
"title": "Order",
"type": "string"
},
"post_id": {
"default": null,
"title": "Post Id",
"type": "string"
},
"user_id": {
"default": null,
"title": "User Id",
"type": "string"
}
},
"title": "get_collectionsArguments",
"type": "object"
}