Api historical data

how can i get 5min historical data of a option for last 6 months.