Skip to main content
GET
Find Specs (Search)
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 Details

query (REQUIRED)
  • Regex pattern matched against spec input field
  • Case-insensitive by default
  • Supports full regex syntax
  • Must be URL-encoded in request
limit
  • Minimum: 1
  • Maximum: 100
  • Default: 20
skip
  • Minimum: 0
  • Used for pagination
endpoint
  • fast_spec - Only search Fast Spec generations
  • deep_spec - Only search Deep Spec generations
status
  • pending - Only queued specs
  • processing - Only specs currently generating
  • completed - Only successfully finished specs
  • failed - 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:
Search with URL encoding:
Search completed specs only:
Search with OR condition:
Complex pattern with pagination:

JavaScript/Node.js

TypeScript

Python

Common Use Cases

1. Search Bar Implementation

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 status and endpoint filters
  • 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 input field
  • 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

Authorization
string
header
default:YOUR_API_KEY
required

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

query
string
required

REQUIRED - Regex pattern to search (case-insensitive)

Example:

"payment"

limit
integer
default:20

Number of results per page (1-100)

Required range: 1 <= x <= 100
Example:

20

skip
integer
default:0

Number of records to skip for pagination

Required range: x >= 0
Example:

0

endpoint
enum<string>

Filter by endpoint type

Available options:
fast_spec,
deep_spec
Example:

"fast_spec"

status
enum<string>

Filter by processing status

Available options:
pending,
processing,
completed,
failed
Example:

"completed"

Response

Search results retrieved successfully

specs
object[]
required

Array of spec objects matching the filters

total
integer
required

Total number of specs matching the filters

Example:

42

hasMore
boolean
required

Whether more pages are available

Example:

true