Using API V6 on Client Script

Using API V6 on Client Script

Hello, Can i using API V6 in client script to get all data from related field? if possible how to do that