# Product Hunt Integration via LowCodeAPI
**Last Updated**: January 27, 2025
## Overview
Product Hunt is a platform for sharing and discovering new products. The API allows you to query posts, collections, topics, users, and more.
**Categories:**
- {'id': 'social-media', 'name': 'Social Media', 'description': 'Social media platforms and content sharing APIs', 'priority': 7}
## Base Endpoint
https://api.lowcodeapi.com/producthunt
**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`
## Authentication
**Type:** OAUTH2.0
**Official Documentation:** https://api.producthunt.com/v2/docs
## URL Format (Important)
LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.
### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`
### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`
### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider
## API Categories
## Common Endpoints
### Query posts from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/posts?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query a single post by ID or slug
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/post?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query collections from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/collections?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query a single collection by ID or slug
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/collection?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query topics from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/topics?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query a single topic by ID or slug
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/topic?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query users from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/users?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query a single user by ID or username
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/user?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query comments from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/comments?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
### Query votes from Product Hunt
**Method:** POST
**LowCodeAPI Path:** /v2/api/graphql
**New Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/producthunt/v2/api/graphql/votes?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| query | string | |
| variables | object | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/producthunt/v2/api/graphql?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://api.producthunt.com/v2/docs
## Usage Examples
### Example 1: Basic API Request (New Format)
Making a simple GET request to retrieve resources:
```bash
# Get a list of resources - no path parameters needed
curl -X GET "https://api.lowcodeapi.com/producthunt/endpoint?api_token=YOUR_API_TOKEN"
```
### Example 2: Request with Path Parameters (New Format)
Retrieving a specific resource using its ID:
```bash
# Get specific resource by ID - replace RESOURCE_ID with actual ID from previous response
curl -X GET "https://api.lowcodeapi.com/producthunt/endpoint/{RESOURCE_ID}?api_token=YOUR_API_TOKEN"
# Note: RESOURCE_ID typically comes from a previous list request or from the provider dashboard
```
### Example 3: POST Request with Body (New Format)
Creating a new resource:
```bash
# Create a new resource
curl -X POST "https://api.lowcodeapi.com/producthunt/endpoint?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"field": "value", "another_field": "another_value"}'
```
## Error Handling
LowCodeAPI returns standard HTTP status codes. Common errors:
| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |
All error responses include error details:
```json
{
"data": {
"error": {
"message": "Error description",
"code": "ERROR_CODE"
}
}
}
```
## Complete Endpoint Reference
| Endpoint | Method | Category |
|----------|--------|----------|
| Query posts from Product Hunt | POST | Posts |
| Query a single post by ID or slug | POST | Posts |
| Query collections from Product Hunt | POST | Collections |
| Query a single collection by ID or slug | POST | Collections |
| Query topics from Product Hunt | POST | Topics |
| Query a single topic by ID or slug | POST | Topics |
| Query users from Product Hunt | POST | Users |
| Query a single user by ID or username | POST | Users |
| Query comments from Product Hunt | POST | Comments |
| Query votes from Product Hunt | POST | Votes |
| Query makers from Product Hunt | POST | Makers |
| Query a single maker by ID or username | POST | Makers |
| Execute GraphQL mutations on Product Hunt | POST | Mutations |
| Execute custom GraphQL query or mutation | POST | Custom |
| Exchange authorization code for access token | POST | Authentication |
## API Definition Endpoints
You can fetch the complete API specification for this provider:
**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/producthunt/openapi'
```
**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/producthunt/definition'
```
## Response Format
All responses are wrapped in a `data` key:
```json
{
"data": {
// Actual response from provider (object or array)
}
}
```