Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsListen for the page’s request event and call url() on the supplied request object:
page.on('request', request => {
console.log(request.url());
});
This observes requests as the page makes them; you do not need request interception just to read or log their URLs.
As an Amazon Associate I earn from qualifying purchases.
Log request URLs in a working Puppeteer script
Register the listener before navigating so it can observe requests made during page load. The callback receives an HTTPRequest; its url() method returns that request’s URL as a string.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
page.on('request', request => {
console.log(request.url());
});
await page.goto('https://example.com');
} finally {
await browser.close();
}
This example uses an ES module import. Run it in a Node.js project configured for ES modules with Puppeteer installed. Replace the navigation URL with the page you want to observe. The output is one line per request event, so a page may produce URLs for its document, scripts, stylesheets, images, and other resources.
#1 Best Overall
Filter for a particular request
Read the URL once in the callback, then apply your own condition. For example, to log URLs containing /api/:
page.on('request', request => {
const url = request.url();
if (url.includes('/api/')) {
console.log(url);
}
});
The substring is just an illustrative filter. You can use an exact match, a regular expression, or another request property according to what you need to identify. The URL returned by request.url() is a string.
Rank #2
Request URL and response URL are different observations
Use the event and object that match the point in the lifecycle you care about:
page.on('request', request => ...)observes an outgoing request and exposes its URL throughrequest.url().page.on('response', response => ...)observes a response and exposes its URL throughresponse.url().
For the URL of a request as the page issues it, use the request event. A response listener is useful when your code is specifically handling responses.
How redirects appear in the log
A redirect is represented as a successfully finished request followed by a new request to the redirected destination. Consequently, a request listener can log both the original URL and the destination URL as separate requests. Treat them as separate events rather than assuming one request object changes its URL in place.
When request interception is needed
Do not enable interception just to inspect URLs. Use page.setRequestInterception(true) when you need to modify, abort, or fulfill requests. With interception enabled, each request stalls until it is resolved—for example, by continuing, responding, or aborting it. A URL-only interception handler must still continue each request:
Rank #4
await page.setRequestInterception(true);
page.on('request', request => {
console.log(request.url());
request.continue();
});
If multiple handlers or asynchronous work may resolve the same intercepted request, check request.isInterceptResolutionHandled() before resolving it, and check again after awaiting. Another handler may have resolved it in the meantime. This extra resolution logic applies to interception workflows, not ordinary request-event logging.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshooting
- No URLs appear: Attach the listener before
page.goto()and make sure the page actually initiates requests. The event reports requests made by that page. - Navigation hangs after enabling interception: Every intercepted request needs to be resolved. Continue requests you are not changing, or respond to or abort them as appropriate.
- The same destination appears more than once: A page can issue multiple requests, and redirects can result in a new request for the destination. The event logs request events, not a deduplicated list of destinations.
- You need the URL associated with a response: Listen for
responseand useresponse.url(); userequest.url()when handling the outgoing request.
Or skip the browser setup
If your goal is a clean screenshot of a page rather than inspecting every network request, ScreenshotNeo can return an image or PDF with one GET request. It does not expose Puppeteer’s request-event log, so it is not a replacement when you need to collect request URLs.
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for parameters. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

