Skip to main content
POST
Regex Search
Search your indexed repositories, documentation, and documents using regex patterns. Perfect for exact pattern matching, security audits (finding secrets, API keys), compliance checks (finding violations), and code analysis.

Endpoint

POST /v1/search/regex

Request Body

string
Regular expression pattern to search for (required if template not provided). Maximum length: 10,000 characters.
string
Use pre-built pattern template instead of custom pattern. Available templates: api_key, password, secret_key, token, credential, private_key, ssh_key, aws_access_key, aws_secret_key, github_token, slack_token, jwt_token, ip_address, email, credit_card, ssn, unencrypted_storage, public_access, publicly_accessible, missing_backup, no_encryption, no_versioning, no_logging, no_mfa, insecure_protocol, latest_tag, no_resource_limits, hardcoded_port, hardcoded_url, function_definition, class_definition, terraform_resource, terraform_data_source, terraform_variable, kubernetes_secret, kubernetes_configmap, docker_expose, docker_volume, ansible_vault, ansible_playbook, cloudformation_resource, cloudformation_output.
array
List of repositories to search (owner/repo format, e.g., ["owner/repo"]).
array
Filter by specific indexed resource IDs.
array
Filter by resource type: repository, documentation, document.
array
Filter by file extensions (e.g., [".tf", ".yaml", ".py", ".md"]).
string
Filter by code type: terraform, kubernetes, docker, python.
string
Filter by cloud provider mentioned in code: aws, gcp, azure.
boolean
default:"false"
Case-sensitive matching.
boolean
default:"false"
Multiline mode (^ and $ match line boundaries).
boolean
default:"false"
Dot matches newline.
boolean
default:"true"
Include surrounding code context around matches.
integer
default:"3"
Number of lines before/after match to include in context.
integer
default:"100"
Maximum number of results to return.
number
default:"30.0"
Maximum search time in seconds.

Request Example

Response Example

Rate Limits