Is there other api as eglQueryStreamKHR?

Hi,
Could you try EGL_DEFAULT_DISPLAY?

There is a topic about headless mode and may be similar to your case:
How to create metadatacontainer without egl display? - #8 by DaneLLL
In headless mode, you would need to keep nvdisplay driver or certain functions may not work properly.