The PulseAudio FAQ has this sentence:
If $DISPLAY is set, the library tries to connect to that server and looks for the root window property PULSE_SERVER for the host to connect to.
For a given $DISPLAY, how can I retrieve this and other root window properties, from, say, bash or Python?
I think the xprop command is what you’re looking for: