Documentation
Prompt library API
A read-only JSON API over the full library. It is free, requires no key and sends CORS headers so you can call it from a browser. Requests are limited to 60 per minute per IP for list endpoints and 120 per minute for single prompts. Prompt text is licensed for personal and commercial use; attribution is appreciated but not required.
Base URLhttps://www.aiprompt123.com/api
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/prompts | List and search prompts. Returns paginated full prompt objects. |
| GET | /api/prompts/{slug} | Fetch one prompt by slug, including platform names and category name. |
| GET | /api/categories | List all 20 categories with descriptions, use cases and prompt counts. |
Query parameters
Applies to GET /api/prompts.
| Parameter | Type | Description |
|---|---|---|
| q | string | Full-text search across title, summary, prompt text and tags. |
| category | string | Category slug, for example `writing` or `coding`. |
| platform | string | Platform slug, for example `chatgpt` or `midjourney`. |
| difficulty | string | One of `Beginner`, `Intermediate` or `Advanced`. |
| sort | string | `popular` (default), `newest`, `rating`, `copies`, `updated` or `az`. |
| page | number | Page number, starting at 1. Default 1. |
| limit | number | Results per page, 1–100. Default 20. |
Example request
curl
curl "https://aiprompt123.com/api/prompts?category=writing&platform=claude&limit=2"
Example response
200 application/json
{
"data": [
{
"slug": "rewrite-a-paragraph-for-clarity",
"title": "Rewrite a paragraph for clarity",
"summary": "…",
"prompt": "…",
"categorySlug": "writing",
"platformSlugs": ["chatgpt", "claude", "gemini"],
"difficulty": "Beginner",
"variables": [{ "name": "paragraph", "label": "Paragraph", "…": "…" }],
"howTo": ["…"],
"faq": [{ "q": "…", "a": "…" }],
"copies": 14,
"rating": 4.9,
"updatedAt": "2026-10-02"
}
],
"meta": {
"total": 26,
"page": 1,
"limit": 2,
"totalPages": 13,
"source": "https://aiprompt123.com",
"license": "Free for personal and commercial use."
}
}Errors and limits
404— the prompt slug does not exist. The response body is{ "error": "Prompt not found." }.429— rate limit exceeded. TheRetry-Afterheader gives the number of seconds to wait.- Responses are cached for five minutes at the edge and one hour in shared caches. The public API is read-only; the interaction routes the site itself uses (copies, views, ratings and comments) are rate limited and are not intended for bulk use.
Licence and attribution
Prompt text may be stored, adapted and used commercially. If you build a public product on the API, link back to aiprompt123.com and do not present the library as your own editorial work. Editorial explanations, worked examples and repository summaries remain copyright AIPrompt123.