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)
Search for specifications using powerful regex patterns with optional status and endpoint filtering.
Search with URL encoding:
Search completed specs only:
Search with OR condition:
Complex pattern with pagination:
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 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
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:
Most HTTP clients handle this automatically.
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/key (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"

