120

How to search through all the ajax responses in network tab in Chrome?

I want to do this is because it is difficult for a JavaScript developer to get to know which information is coming from which service call, especially if you are new to the project and business logic is not clear. Also, opening each service in a network tab and searching in responses of so many service calls is difficult and time consuming.

BSMP
  • 4,596
  • 8
  • 33
  • 44
Shishir Arora
  • 5,521
  • 4
  • 30
  • 35

8 Answers8

76

This has now been implemented on the Network tab. Whenever a search criteria is added, Chrome will offer searching through all headers and bodies.

enter image description here

More from offical doc,

Open the Network panel then press Command+F (Mac) or Control+F (Windows, Linux, Chrome OS) to open the new Network Search pane.

search network

Black
  • 18,150
  • 39
  • 158
  • 271
Daniel
  • 1,287
  • 12
  • 12
  • 6
    Doesn't work correctly. Sometimes it correctly finds a string in a json response, sometimes it doesn't... which makes it worse than useless. I filed a bug report here: https://bugs.chromium.org/p/chromium/issues/detail?id=944219 – BlueRaja - Danny Pflughoeft Mar 20 '19 at 21:39
  • 14
    As of Chrome 78, at least, searching for strings within POST request form data doesn't seem to work. – jdunning Dec 14 '19 at 00:36
  • Is there a way to do this as a live filter that I don't have to keep manually refreshing? – JoeMjr2 Apr 03 '20 at 19:54
  • Yes this does not work. Need to find a way to download ALL data inputs outputs everthing as text. Is there a way? – mathtick Aug 16 '22 at 16:24
  • Seemed to work for me, was a bit tricky to bring up the search box but worked in the end – Anthony Sep 19 '22 at 14:47
  • Make sure you use the correct search box--there are at least 3. The one that worked for me was on the far left of DevTools. – jbobbins Jul 27 '23 at 04:43
27

This is similar to another question this morning to search json responses. The solution is the same, star this issue this issue. Starring is triggered via the star icon in the far left area of the blue title are just under search.

Starring issues let's the developers know what people need. The more stars something has, the more likely it is to get worked on sooner.

Currently this functionality is not provided and extensions are unable to add this type of functionality since the network panel isn't extensible in this way.

Arnulf
  • 48
  • 1
  • 7
Garbee
  • 10,581
  • 5
  • 38
  • 41
  • done. This can be an extension to that issue if that gets solved. – Shishir Arora Jul 07 '15 at 16:47
  • 7
    This issue relates to search within a single tab (response). It's fixed now, but there's no search through all responses. @BlueRaja-DannyPflughoeft – Anton Tarasenko Apr 07 '17 at 15:46
  • 2
    @Garbee, can you please update your answer? The issue you pointing to was about searching the content of ONE selected XHR, while the problem in this specific topic is about CTRL+SHIFT+F across all the XHRs. This one: https://bugs.chromium.org/p/chromium/issues/detail?id=468416&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&groupby=&sort= – Mike Makarov Jan 10 '18 at 14:56
14

In Firefox you can save all the responses as a HAR file and then search through the file in a text editor (Chrome truncates the responses).

bensentropy
  • 1,293
  • 13
  • 17
  • 2
    Also, I found this tool useful for searching in the HAR file https://toolbox.googleapps.com/apps/har_analyzer/ – Adrian Florescu Jun 04 '18 at 14:04
  • It seems that Chrome can do that too now, I'm in v91, and when I right-click on one of the requests I can select "Save all as HAR with content". (Just generated a 192Mb file) – OOM Jun 24 '21 at 17:32
4

Inspector of Microsoft Edge browser offer such feature. Useful when you need to search through traffic made by an HTTPS web site that Fiddler cannot inspect (like Facebook web site).

Marco Marsala
  • 2,332
  • 5
  • 25
  • 39
  • 1
    Fiddler can inspect websites like facebook, but you need to make & install an enhanced fake ssl cert with https://www.fiddlerbook.com/dl/FiddlerCertMaker.exe first – hanshenrik Jun 27 '17 at 11:21
2

FYI, If you use MS Edge developer tools, use the magnifying glass to search all responses and avoid using the filter textbox.

enter image description here

vaheeds
  • 2,594
  • 4
  • 26
  • 36
1

There doesn't seem to be a way to do this in Chrome or Firefox. My solution has been to use Fiddler, which does support it.

BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283
0

they changed it

now it is not in the field any longer that got so many upvotes... press CTRL + F and it should open a new search (not CTRL + SHIFT + F)

enter image description here

alternative click on the magnifying glass next to the filter

enter image description here

Toskan
  • 13,911
  • 14
  • 95
  • 185
-2

Edit: I believe this was working for all resources at the time of writing, but please see comments because people say it is not/no-longer working as expected.


As of Chrome version 91, if you want to search through all resources (not just AJAX/fetched resources), then you need to open DevTools and then press Ctrl+Shift+F to open a search box. If you just type into the "filter" text input then it only searches through the URLs, rather than also searching the contents.

enter image description here

joe
  • 3,752
  • 1
  • 32
  • 41