use api to retrieve contents