Wikiprompt

API documentation

From Wikiprompt, the Wikipedia of AI prompts. Integrate prompts and metadata into your own apps via a public REST API.

Overview

Base URL
https://wikiprompt.org/api
Authentication
Bearer token in header
Rate limit
100 requests / minute

Authentication

Some endpoints require authentication. Include your access token in the Authorization header.

Authorization: Bearer YOUR_ACCESS_TOKEN

To generate an access token, sign in and visit your profile to create an API key, or use a Supabase session token.

API v1 (API Key Auth)

POST/api/v1/promptsAuth required

Create a prompt using API key authentication. Generate API keys in your profile.

Request body

FieldTypeRequiredDescription
titlestringyesPrompt title (min 3 chars)
contentstringyesThe prompt content (min 10 chars)
descriptionstringnoShort description
categorystringnoCategory: writing, coding, business, marketing, education, creative, productivity, analysis, other
tagsstring[]noArray of tags (max 10)
is_publicbooleannoMake prompt public (default: true)

Response

{
  "success": true,
  "message": "Prompt created successfully",
  "prompt": {
    "id": "uuid",
    "title": "string",
    "description": "string",
    "category": "string",
    "tags": ["string"],
    "is_public": true,
    "created_at": "timestamp"
  }
}

Example

curl -X POST "https://wikiprompt.org/api/v1/prompts" \
  -H "Authorization: Bearer wp_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Python Code Reviewer",
    "content": "Act as a senior Python developer...",
    "description": "Reviews Python code for best practices",
    "category": "coding",
    "tags": ["python", "code-review"]
  }'
GET/api/v1/promptsAuth required

List your prompts using API key authentication

Response

{
  "success": true,
  "count": 10,
  "prompts": [
    {
      "id": "uuid",
      "title": "string",
      "description": "string",
      "category": "string",
      "tags": ["string"],
      "created_at": "timestamp",
      "likes_count": 0,
      "views_count": 0
    }
  ]
}

Example

curl "https://wikiprompt.org/api/v1/prompts" \
  -H "Authorization: Bearer wp_YOUR_API_KEY"

Prompts

GET/api/prompts

Get a list of all prompts with pagination and filters

Query parameters

NameTypeRequiredDescription
pagenumbernoPage number (default: 1)
limitnumbernoItems per page (default: 20, max: 100)
categorystringnoFilter by category
searchstringnoSearch in title and description
sortstringnoSort by: newest, oldest, popular, views
user_idstringnoFilter by user ID

Response

{
  "data": [
    {
      "id": "uuid",
      "title": "string",
      "description": "string",
      "content": "string",
      "category": "string",
      "tags": ["string"],
      "likes_count": 0,
      "views_count": 0,
      "profiles": {
        "id": "uuid",
        "username": "string",
        "avatar_url": "string"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "total_pages": 5
  }
}

Example

curl "https://wikiprompt.org/api/prompts?category=ChatGPT&limit=10"
POST/api/promptsAuth required

Create a new prompt

Request body

FieldTypeRequiredDescription
titlestringyesPrompt title (5-100 chars)
descriptionstringyesShort description (10-500 chars)
contentstringyesThe prompt content (20-10000 chars)
categorystringyesCategory name
tagsstring[]noArray of tags (max 5)
is_paidbooleannoIs this a paid prompt?
pricenumbernoPrice in USD (if is_paid)

Response

{
  "data": {
    "id": "uuid",
    "title": "string",
    "description": "string",
    "content": "string",
    "category": "string",
    "tags": ["string"],
    "created_at": "timestamp"
  }
}

Example

curl -X POST "https://wikiprompt.org/api/prompts" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title": "My Prompt", "description": "A great prompt", "content": "Act as...", "category": "ChatGPT"}'
GET/api/prompts/:id

Get a single prompt by ID

Response

{
  "data": {
    "id": "uuid",
    "title": "string",
    "description": "string",
    "content": "string",
    "category": "string",
    "tags": ["string"],
    "likes_count": 0,
    "views_count": 0,
    "profiles": {
      "id": "uuid",
      "username": "string",
      "avatar_url": "string",
      "bio": "string"
    }
  }
}

Example

curl "https://wikiprompt.org/api/prompts/abc123"
PUT/api/prompts/:idAuth required

Update a prompt (owner only)

Request body

FieldTypeRequiredDescription
titlestringnoNew title
descriptionstringnoNew description
contentstringnoNew content
categorystringnoNew category
tagsstring[]noNew tags

Response

{
  "data": {
    "id": "uuid",
    "title": "string",
    "description": "string",
    "content": "string",
    "updated_at": "timestamp"
  }
}
DELETE/api/prompts/:idAuth required

Delete a prompt (owner only)

Response

{
  "message": "Prompt deleted successfully"
}
POST/api/prompts/:id/likeAuth required

Like a prompt

Response

{
  "message": "Prompt liked successfully"
}
DELETE/api/prompts/:id/likeAuth required

Unlike a prompt

Response

{
  "message": "Prompt unliked successfully"
}

Users

GET/api/users/:id

Get a user profile with stats

Response

{
  "data": {
    "id": "uuid",
    "username": "string",
    "avatar_url": "string",
    "bio": "string",
    "created_at": "timestamp",
    "stats": {
      "prompts_count": 10,
      "total_likes": 150,
      "total_views": 5000
    }
  }
}

Example

curl "https://wikiprompt.org/api/users/abc123"
GET/api/users/:id/prompts

Get all prompts by a user

Query parameters

NameTypeRequiredDescription
pagenumbernoPage number
limitnumbernoItems per page

Response

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 50,
    "total_pages": 3
  }
}

Categories

GET/api/categories

Get all categories with prompt counts

Response

{
  "data": [
    {
      "id": "ChatGPT",
      "name": "ChatGPT",
      "description": "Prompts for OpenAI ChatGPT",
      "prompts_count": 150
    }
  ],
  "total_prompts": 500
}

Example

curl "https://wikiprompt.org/api/categories"

Stats

GET/api/stats

Get platform statistics

Response

{
  "data": {
    "total_prompts": 500,
    "total_users": 100,
    "total_likes": 2500,
    "top_categories": [
      { "name": "ChatGPT", "count": 150 }
    ],
    "category_distribution": {
      "ChatGPT": 150,
      "Midjourney": 100
    }
  }
}

Example

curl "https://wikiprompt.org/api/stats"

Error codes

CodeDescription
200Success
201Created
400Bad Request β€” invalid parameters
401Unauthorized β€” authentication required
403Forbidden β€” not allowed to access resource
404Not Found β€” resource doesn’t exist
500Internal Server Error

Support

Need help? Contact us at api@wikiprompt.org.