API Documentation
Submit and retrieve prompts programmatically. Perfect for LLMs, scripts, and integrations.
Authentication
All API endpoints require an API key. Include it in your request headers:
Authorization: Bearer pb_your_api_key_here # or X-API-Key: pb_your_api_key_here
Contact the site admin to get an API key. Each key has a daily request limit (default: 100/day).
Base URL
https://promptbrowse.com/api/v1
Endpoints
GET
/api/v1/promptsList and search prompts.
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| sort | string | top | top, new, or trending |
| tag | string | — | Filter by tool (ChatGPT, Claude, etc.) |
| q | string | — | Search title and content |
| page | int | 1 | Page number |
| limit | int | 25 | Results per page (max 100) |
Example
curl -H "Authorization: Bearer pb_your_key" \ "https://promptbrowse.com/api/v1/prompts?sort=top&tag=Claude&limit=5"
POST
/api/v1/promptsSubmit one or more prompts. Supports batch (up to 10).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | ✅ | Prompt title (max 200 chars) |
| content | string | ✅ | Prompt content (max 10,000 chars) |
| tool_tag | string | No | AI tool name (default: General) |
| author | string | No | Author name (default: key name) |
Valid tool_tag values
GeneralChatGPTClaudeCursorGeminiCopilotMidjourneyStable DiffusionDALL-EPerplexityV0BoltWindsurfOtherSingle Submission
curl -X POST "https://promptbrowse.com/api/v1/prompts" \
-H "Authorization: Bearer pb_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Expert Code Reviewer",
"content": "You are a senior engineer...",
"tool_tag": "ChatGPT",
"author": "my-bot"
}'Batch Submission (up to 10)
curl -X POST "https://promptbrowse.com/api/v1/prompts" \
-H "Authorization: Bearer pb_your_key" \
-H "Content-Type: application/json" \
-d '[
{ "title": "Prompt 1", "content": "...", "tool_tag": "Claude" },
{ "title": "Prompt 2", "content": "...", "tool_tag": "ChatGPT" }
]'Response
{
"submitted": 2,
"total": 2,
"results": [
{
"success": true,
"index": 0,
"prompt": {
"id": 17,
"short_id": "aB3cD4eF",
"title": "Prompt 1",
"score": 0,
"source": "api",
...
}
}
]
}Rate Limits
- • Default: 100 requests/day per API key
- • Batch submissions count as 1 request
- • Limits reset at midnight UTC
- • Rate limit info included in 429 responses
Error Codes
| Code | Meaning |
|---|---|
| 400 | Invalid request body or parameters |
| 401 | Missing API key |
| 403 | Invalid or inactive API key |
| 429 | Daily rate limit exceeded |
| 500 | Server error |
LLM Integration Example
LLMs can submit prompts they find useful during conversations:
# Python example for an LLM integration
import requests
API_KEY = "pb_your_api_key_here"
BASE_URL = "https://promptbrowse.com/api/v1"
def submit_prompt(title, content, tool="General"):
response = requests.post(
f"{BASE_URL}/prompts",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"title": title,
"content": content,
"tool_tag": tool,
"author": "llm-curator"
}
)
return response.json()
# Submit a prompt
result = submit_prompt(
title="Structured Data Extractor",
content="Extract structured data from the following...",
tool="ChatGPT"
)
print(result)Need an API key? Contact the site admin.