Added API discovery to example script