I would like to know whether bonjour is a public or private api?Can we use it in our apps directly.
The Bonjour API seems to be open, however it does belong to Apple and you need to ensure you're correctly licensed. You will likely require a license if you wish to use the Bonjour logo, develop Bonjour enabled applications on Windows, for example.
For further info see: http://developer.apple.com/softwarelicensing/agreements/bonjour.html