Create a new empty search query builder
Combine this query with another using AND logic
Another SearchQuery to combine with
New SearchQuery with combined logic
Filter by a single article type
Article type (case-insensitive) Supported types: "Clinical Trial", "Review", "Systematic Review", "Meta-Analysis", "Case Reports", "Randomized Controlled Trial" (or "RCT"), "Observational Study"
Self for method chaining
Filter by multiple article types (OR logic)
Array of article type names (case-insensitive)
Self for method chaining
Exclude articles matching the given query
SearchQuery representing articles to exclude
New SearchQuery with exclusion logic
Add parentheses around the current query for grouping
New SearchQuery wrapped in parentheses
Filter by language
Language name (case-insensitive) Supported: "English", "Japanese", "German", "French", "Spanish", etc. Unknown languages are passed through as custom values.
Self for method chaining
Combine this query with another using OR logic
Another SearchQuery to combine with
New SearchQuery with combined logic
Filter by publication date range
Start year (inclusive)
OptionalendYear: number | nullEnd year (inclusive, optional)
Self for method chaining
Set the sort order for search results
Sort order (case-insensitive) Supported: "relevance", "pub_date", "author", "journal"
Self for method chaining
Add multiple search terms at once
Each term is processed like query(). Empty strings are filtered out.
Array of search term strings
Self for method chaining
Builder for constructing PubMed search queries programmatically
Provides a fluent API for building complex PubMed search queries with support for:
Example