connect to api and get the data using node