Is the 'Query Builder' interface of SAS Enterprise Gukde accessable through an API?
No, the full query builder is not available via an API. However, the simpler Filter and Sort interface is available for use in custom tasks.
See Custom Tasks for SAS Enterprise Guide using Microsoft .NET
Look at the Chapter 11 (Running Totals) example.