# search_prompts_retrieve Search and filter AI prompts across the platform. This endpoint provides a search interface for discovering AI prompts with support for filtering, pagination, and detailed prompt information. Query Parameters: # Identification parameters (for detail view) id (int, optional): Retrieve a specific prompt by ID # Search and filtering parameters query (str, optional): Search term to filter prompts by name or content category (str, optional): Filter by prompt category language (str, optional): Filter by prompt language style (str, optional): Filter by writing style tone (str, optional): Filter by tone tenant (str, optional): Filter by tenant/organization mentor (str, optional): Filter by associated mentor (UUID) # Sorting and pagination sort_by (str, optional): Field to sort results by order_direction (str, optional): Sort direction ('asc' or 'desc', default: 'desc') alphabetical (bool, optional): Sort alphabetically by name (default: false) limit (int, optional): Number of results per page (default: 10) offset (int, optional): Starting position for pagination # Special parameters filter_facet (any, optional): If present, return only facets without results Returns: For detail view (when id is provided): A JSON response containing a single prompt's details: { "id": 456, "name": "Essay Writing Guide", "content": "Write a well-structured essay on the following topic: {{topic}}...", "category": "Academic Writing", "language": "English", "style": "Formal", "tone": "Professional", "mentor": { "id": 123, "unique_id": "550e8400-e29b-41d4-a716-446655440000", "name": "Professor Smith" }, "platform": { "id": 1, "name": "Example University", "key": "example-university" }, "created_at": "2023-02-10T09:15:00Z", "updated_at": "2023-05-05T14:20:00Z", "visibility": "public", "variables": ["topic", "length", "style"] } For list view: A JSON response containing: { "results": [ { "id": 456, "name": "Essay Writing Guide", "content": "Write a well-structured essay on the following topic: {{topic}}...", "category": "Academic Writing", "language": "English", "style": "Formal", "tone": "Professional", "mentor": {"id": 123, "name": "Professor Smith"}, "created_at": "2023-02-10T09:15:00Z", "updated_at": "2023-05-05T14:20:00Z" }, // Additional prompt objects... ], "count": 30, "next": "?limit=10&offset=10", "previous": null, "current_page": 1, "num_pages": 3, "facets": { "category": [ {"key": "Academic Writing", "doc_count": 15}, {"key": "Creative Writing", "doc_count": 10}, {"key": "Technical Documentation", "doc_count": 5} ], "language": [ {"key": "English", "doc_count": 25}, {"key": "Spanish", "doc_count": 5} ], "style": [ {"key": "Formal", "doc_count": 20}, {"key": "Casual", "doc_count": 10} ], "tone": [ {"key": "Professional", "doc_count": 15}, {"key": "Friendly", "doc_count": 10}, {"key": "Technical", "doc_count": 5} ] } } Error Responses: 400 Bad Request: If the request parameters are invalid 403 Forbidden: If the requested prompt exists but is not publicly available 404 Not Found: If the requested prompt doesn't exist 500 Internal Server Error: If an unexpected error occurs Notes: - Only publicly available prompts are returned by default - When filtering by mentor, the mentor ID must be a valid UUID Endpoint: GET /api/search/prompts/ Version: 3.59.0-ai-plus ## Query parameters: - `alphabetical` (boolean) Sort alphabetically - `category` (string) Filter by prompt category - `filter_facet` (boolean) If true, return only facets without results - `language` (string) Filter by prompt language - `limit` (integer) Number of results per page - `mentor` (string) Filter by mentor UUID - `offset` (integer) Starting position for pagination - `order_direction` (string) Sort direction ('asc' or 'desc') - `query` (string) Search term to filter prompts by name or content - `sort_by` (string) Field to sort results by - `style` (string) Filter by prompt style - `tenant` (string) Filter by tenant/organization - `tone` (string) Filter by prompt tone ## Response 200 fields (application/json): - `results` (array, required) List of prompts matching the search criteria - `results.id` (integer, required) - `results.mentor` (string) - `results.tone` (string,null) - `results.style` (string) - `results.language` (string) - `results.tags` (array) - `results.is_system` (boolean) - `results.metadata` (any) - `results.category` (string) - `results.prompt` (string, required) - `results.title` (string,null) - `results.description` (string,null) - `results.prompt_visibility` (any,null) - `results.created_at` (string, required) - `results.updated_at` (string, required) - `results.created_by` (string,null) - `results.platform` (integer, required) - `count` (integer, required) Total number of prompts matching the search criteria - `next` (string,null, required) URL for the next page of results - `previous` (string,null, required) URL for the previous page of results - `current_page` (integer, required) Current page number - `num_pages` (integer, required) Total number of pages - `facets` (object) Facet information for filtering