$npx -y skills add ReScienceLab/opc-skills --skill producthuntSearch and retrieve content from Product Hunt. Get posts, topics, users, and collections via the GraphQL API. Use when user mentions Product Hunt, PH, or product launches.
| 1 | # ProductHunt Skill |
| 2 | |
| 3 | Get posts, topics, users, and collections from Product Hunt via the official GraphQL API. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | Set access token in `~/.zshrc`: |
| 8 | ```bash |
| 9 | export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token" |
| 10 | ``` |
| 11 | |
| 12 | Get your token from: https://www.producthunt.com/v2/oauth/applications |
| 13 | |
| 14 | **Quick Check**: |
| 15 | ```bash |
| 16 | cd <skill_directory> |
| 17 | python3 scripts/get_posts.py --limit 3 |
| 18 | ``` |
| 19 | |
| 20 | ## Commands |
| 21 | |
| 22 | All commands run from the skill directory. |
| 23 | |
| 24 | ### Posts |
| 25 | ```bash |
| 26 | python3 scripts/get_post.py chatgpt # Get post by slug |
| 27 | python3 scripts/get_post.py 12345 # Get post by ID |
| 28 | python3 scripts/get_posts.py --limit 20 # Today's featured posts |
| 29 | python3 scripts/get_posts.py --topic ai --limit 10 # Posts in topic |
| 30 | python3 scripts/get_posts.py --after 2026-01-01 # Posts after date |
| 31 | python3 scripts/get_post_comments.py POST_ID --limit 20 |
| 32 | ``` |
| 33 | |
| 34 | ### Topics |
| 35 | ```bash |
| 36 | python3 scripts/get_topic.py artificial-intelligence # Get topic by slug |
| 37 | python3 scripts/get_topics.py --query "AI" --limit 20 # Search topics |
| 38 | python3 scripts/get_topics.py --limit 50 # Popular topics |
| 39 | ``` |
| 40 | |
| 41 | ### Users |
| 42 | ```bash |
| 43 | python3 scripts/get_user.py rrhoover # Get user by username |
| 44 | python3 scripts/get_user_posts.py rrhoover --limit 20 # User's posts |
| 45 | ``` |
| 46 | |
| 47 | ### Collections |
| 48 | ```bash |
| 49 | python3 scripts/get_collection.py SLUG_OR_ID # Get collection |
| 50 | python3 scripts/get_collections.py --featured --limit 20 |
| 51 | ``` |
| 52 | |
| 53 | ## API Info |
| 54 | - **Endpoint**: https://api.producthunt.com/v2/api/graphql |
| 55 | - **Type**: GraphQL |
| 56 | - **Rate Limits**: 6250 complexity points / 15 min |
| 57 | - **Docs**: https://api.producthunt.com/v2/docs |