Fetches API data directly, takes period end date and api key as command line variables.