Find Specs (Search)
API Reference
Find Specs
Search specs using regex patterns. Perfect for finding specs by keywords, patterns, or complex search criteria.
GET
Find Specs (Search)
Documentation Index
Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
Use this file to discover all available pages before exploring further.
GET /find-specs
Search for specifications using powerful regex patterns with optional status and endpoint filtering.Overview
- Cost: Free (no credits required)
- Use Cases: Keyword search, pattern matching, finding related specs
- Response Time: Instant
- Search: Case-insensitive regex matching against spec input text
- Returns: Paginated array of matching specs
Endpoint
Headers
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | - | REQUIRED - Regex pattern to search (case-insensitive) |
limit | integer | ❌ | 20 | Results per page (1-100) |
skip | integer | ❌ | 0 | Number of records to skip for pagination |
endpoint | string | ❌ | - | Filter by endpoint: fast_spec or deep_spec |
status | string | ❌ | - | Filter by status: pending, processing, completed, or failed |
Parameter Details
query (REQUIRED)- Regex pattern matched against spec
inputfield - Case-insensitive by default
- Supports full regex syntax
- Must be URL-encoded in request
- Minimum: 1
- Maximum: 100
- Default: 20
- Minimum: 0
- Used for pagination
fast_spec- Only search Fast Spec generationsdeep_spec- Only search Deep Spec generations
pending- Only queued specsprocessing- Only specs currently generatingcompleted- Only successfully finished specsfailed- Only failed generations
Regex Pattern Examples
| Pattern | What It Matches | Example Use Case |
|---|---|---|
payment | Contains “payment” (any case) | Find all payment-related specs |
^Build | Starts with “Build” | Find all “Build X” specs |
platform$ | Ends with “platform” | Find platform projects |
(API|REST) | Contains “API” OR “REST” | Find API-related specs |
auth.*system | ”auth” followed by “system” | Find authentication systems |
\d{3,} | Contains 3+ consecutive digits | Find specs with quantities/budgets |
saas|sass | Contains “saas” OR “sass” | Catch common misspellings |
e-?commerce | ”ecommerce” or “e-commerce” | Match hyphen variations |
task.*management | ”task” then “management” | Find task/project mgmt tools |
real.?time | ”realtime” or “real time” | Match spacing variations |
Response
Success Response
Same structure as/list-specs:
Response Fields
Identical to the list-specs endpoint. See that documentation for complete field descriptions.Code Examples
cURL Examples
Simple keyword search:JavaScript/Node.js
TypeScript
Python
Common Use Cases
1. Search Bar Implementation
2. Find Related Specs
3. Category-Based Search
4. Advanced Search with Multiple Criteria
Regex Tips & Tricks
Common Patterns
URL Encoding
When using cURL or constructing URLs directly, encode special characters:| Character | Encoded | Example Pattern | Encoded URL |
|---|---|---|---|
^ | %5E | ^Build | query=%5EBuild |
$ | %24 | platform$ | query=platform%24 |
| | %7C | API|REST | query=API%7CREST |
( | %28 | (API|REST) | query=%28API%7CREST%29 |
) | %29 | (API|REST) | query=%28API%7CREST%29 |
| Space | %20 or + | task management | query=task+management |
Best Practices
Search Patterns
- Start with simple keywords, add complexity if needed
- Use case-insensitive patterns (already default)
- Handle common variations (hyphens, spaces, plural forms)
- Test patterns before using in production
Performance
- Use specific patterns to reduce result sets
- Combine with
statusandendpointfilters - Implement pagination for large result sets
- Cache frequent searches
User Experience
- Show loading states during search
- Display result counts
- Highlight matched terms in results
- Provide search suggestions or examples
- Handle empty results gracefully
Error Handling
- Validate regex patterns client-side when possible
- Catch and display API errors clearly
- Provide fallback for invalid regex
- Show helpful messages for no results
Limitations
- Search only matches against the
inputfield - Maximum 100 results per request (use pagination for more)
- Regex is case-insensitive by default
- Very complex regex patterns may impact performance
Back: List Specs
List all specs with pagination and filtering.
Authorizations
API key for authentication. Get your API key from https://pre.dev/projects/playground (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY
Query Parameters
REQUIRED - Regex pattern to search (case-insensitive)
Example:
"payment"
Number of results per page (1-100)
Required range:
1 <= x <= 100Example:
20
Number of records to skip for pagination
Required range:
x >= 0Example:
0
Filter by endpoint type
Available options:
fast_spec, deep_spec Example:
"fast_spec"
Filter by processing status
Available options:
pending, processing, completed, failed Example:
"completed"

