App Logo
producthunt.com

Upvote a Product Hunt launch

Upvote a launch on Product Hunt as the signed-in account. Product Hunt's vote control is a toggle, so this script checks whether the account has already upvoted the launch and leaves it alone if so, rather than pressing the control and silently removing an existing vote. The result reports the account that voted, whether the vote was already there, the launch's score afterwards, and confirmation read back from Product Hunt's own response rather than from the button. Accepts a full launch URL or a "product/launch" slug pair. Pair it with the remove-upvote script to undo. Note that Product Hunt votes on a launch, not on a product as a whole: a product with several launches is upvoted one launch at a time.

Input

launch required

Full launch URL (e.g. "https://www.producthunt.com/products/notion/launches/notion-mail") or a "product/launch" slug pair (e.g. "notion/notion-mail").

Output

hasVoted required

Whether the account holds an upvote on this launch after the run. True on success.

launchUrl required
account_used required

Handle of the account that voted, read from the signed-in session rather than assumed.

already_present required

True when this account had already upvoted the launch, so nothing was pressed.

verified_on_page required

True when Product Hunt's own response for the vote confirmed the launch is now upvoted.

postId optional

Product Hunt's numeric id for the launch that was voted on.

scoreAfter optional

Score Product Hunt reported with the vote. Other people vote continuously, so this is their number at that instant, not necessarily scoreBefore + 1.

scoreBefore optional

Score shown on the control before voting. Read from the rendered figure, so it can lag other people's votes by moments.

Start building not clicking