Run wp dbtk api search "keyword" to find REST routes by keyword across paths, descriptions, and parameters. Use wp dbtk api list with attribute flags to filter by namespace, HTTP method, source plugin, or tag. Both commands include WPDT’s own endpoints immediately. Run wp dbtk api discover first to add third-party plugin and WordPress core routes to the schema.
Both commands work without prior discovery, but only include WPDT’s own endpoints until you run wp dbtk api discover. To search and filter the full site route inventory, start with Discovering Registered Routes before continuing.
After wp dbtk api discover returns hundreds of routes across every active plugin and WordPress core, narrowing to a specific endpoint is the practical next step. Use wp dbtk api search when you have a term in mind. Use wp dbtk api list when you want to slice the inventory by a known namespace, HTTP method, or annotation state.
The following flags apply to wp dbtk api search <keyword>, which matches the keyword case-insensitively against route paths, description, summary, purpose, auth_note, returns_summary, tags, parameter names, and parameter descriptions. For annotated routes, the same fields are also searched at the per-method level.
| Flag | What It Filters On |
"keyword" (positional, required) | Routes whose paths, descriptions, tags, parameter names, parameter descriptions, and annotation fields contain the keyword. Annotation fields are populated via wp dbtk api edit. |
--source=<slug> | Narrows results to routes from a single source plugin, e.g., woocommerce |
--annotated-only | Returns only routes that carry semantic annotations |
--format=<format> | Output format: table (default) or json |
The following flags apply to wp dbtk api list, which filters the full route inventory by structured attributes. Every flag you add narrows the result set further using AND logic.
| Flag | What It Filters On |
--namespace=<namespace> | Routes in the specified REST namespace, e.g., wc/v3 or wp/v2 |
--method=<method> | Routes that accept a specific HTTP method: GET, POST, PUT, or DELETE |
--source=<slug> | Routes registered by the specified source plugin slug |
--tag=<tag> | Routes carrying a specific annotation tag |
--annotated-only | Only routes that have any annotation |
--format=<format> | Output format: table (default) or json |
bash
# Search by keyword across all sources — case-insensitive
wp dbtk api search "checkout"
# Find WooCommerce routes that accept POST requests
wp dbtk api list --namespace=wc/v3 --method=POST
# Narrow keyword results to a specific plugin, return as JSON for piping
wp dbtk api search "product" --source=woocommerce --format=json
# List all annotated routes in the wc/v3 namespace
wp dbtk api list --namespace=wc/v3 --annotated-only --format=jsonwp dbtk api search re-run route discovery, or does it filter a cached result?Both search and list operate on the same merged schema assembled at read time. That schema always includes WPDT’s own endpoints from a static file bundled with the plugin. Third-party plugin and WordPress core routes are included only after running wp dbtk api discover, which writes them to discovered.json. Neither search nor list triggers a re-scan.
No routes matched your keyword or the filters you applied. Try a broader keyword, confirm the relevant plugin is active with wp plugin list, and run wp dbtk api discover if you recently activated that plugin or have not yet run discovery on your site.
Discovering Registered Routes – Run this first to add third-party plugin and WordPress core routes to the schema that search and filtering operate on.
Inspecting an Endpoint – Once you’ve narrowed to a specific route, use wp dbtk api show to view its full schema: parameters, accepted types, and authentication requirements.