WP Debug Toolkit 1.2.0 is LIVE. Get $300 discount on the lifetime deal now
Use Discount Code WPDTLTD
Get WP Debug Toolkit

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.

Before You Begin

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.

Overview

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.

Keyword Search Flags

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.

FlagWhat 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-onlyReturns only routes that carry semantic annotations
--format=<format>Output format: table (default) or json

Attribute Filter Flags

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.

FlagWhat 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-onlyOnly 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=json

Frequently Asked Questions

Does wp 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.

What happens if my search returns zero results?

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.

Related Documentation

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.

On this page
Try WP Debug Toolkit
The best error log viewer with amazing developer tools to help you troubleshoot your WordPress site securely and efficiently. Something something more.