Please review the following documentation to learn how to use the Brilliant Directories API. 

How To Use The Brilliant Directories API

Creating 2 Widgets That Communicate Through JS (This article was create to help understand how widgets communicate with one another)

Create 2 widgets that communicate through a Custom API (actually using the API while making the widgets communicating with one another)

Creating multiple widgets that communicate with each other

This detailed video from our developer documentation center also helps get a more profound understanding of how everything works.