VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-url-search-api/

⇱ Node.js URL.search API - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js URL.search API

Last Updated : 11 Jul, 2025

URL.search is an inbuilt application programming interface(API) of the URL class within the Node.JS
URL.search API is used to get and set the query part of URL. 
 

Syntax: url.search
url : It is an object created by URL constructor.


Example 1: (Getting query string of the URL) 
 

Output: 
 

👁 Image


Example 2: (Setting query string of the URL) 
 

Output: 
 

👁 Image
Comment
Article Tags:

Explore