Skip to main content
property URL.searchParams

The searchParams property of the URL interface is a URL.URLSearchParams object that represents the search parameters of the URL.

Examples

Example 1

const myURL = new URL('https://example.org/foo?bar=baz');
const params = myURL.searchParams;

console.log(params);  // Logs { bar: "baz" }
console.log(params.get('bar'));  // Logs "baz"

Type

See

Back to top