Quarterly Financial Data (Unaudited) (Details)
$ / shares in Units, $ in Thousands
3 Months Ended 12 Months Ended
Dec. 31, 2016
USD ($)
customer
$ / shares
Sep. 30, 2016
USD ($)
$ / shares
Jun. 30, 2016
USD ($)
$ / shares
Mar. 31, 2016
USD ($)
$ / shares
Dec. 31, 2015
USD ($)
$ / shares
Sep. 30, 2015
USD ($)
$ / shares
Jun. 30, 2015
USD ($)
$ / shares
Mar. 31, 2015
USD ($)
$ / shares
Dec. 31, 2016
USD ($)
$ / shares
Dec. 31, 2015
USD ($)
$ / shares
Dec. 31, 2014
USD ($)
$ / shares
Unaudited quarterly financial data                      
Sales $ 2,312,430 $ 2,030,198 $ 2,146,199 $ 1,750,812 $ 2,169,445 $ 2,486,203 $ 2,680,088 $ 2,979,116 $ 8,239,639 $ 10,314,852 $ 17,269,954
Gross profit 154,478 132,611 129,342 130,059 132,624 152,299 144,188 168,558 546,490 597,669 544,787
Net (loss) income (65,662) (156,583) (8,543) (7,835) (2,905) 8,146 7,614 30,409 (238,623) 43,264 116,980
Net (loss) income attributable to Global Partners LP (65,527) (119,551) (7,310) (7,024) (2,282) 8,212 7,218 30,415 (199,412) 43,563 114,709
Limited partners' interest in net (loss) income $ (65,088) $ (118,750) $ (7,261) $ (6,977) $ (2,267) $ 5,380 $ 4,547 $ 28,236 $ (198,076) $ 35,896 $ 108,728
Basic net (loss) income per limited partner unit (in dollars per unit) | $ / shares $ (1.94) $ (3.54) $ (0.22) $ (0.21) $ (0.07) $ 0.16 $ 0.15 $ 0.92 $ (5.91) $ 1.12 $ 3.97
Diluted net (loss) income per limited partner unit (in dollars per unit) | $ / shares (1.94) (3.54) (0.22) (0.21) (0.07) 0.16 0.15 0.92 (5.91) 1.11 3.95
Cash distributions per limited partner unit (in dollars per unit) | $ / shares $ 0.4625 $ 0.4625 $ 0.4625 $ 0.4625 $ 0.6975 $ 0.6925 $ 0.6800 $ 0.6650 $ 1.85 $ 2.74 $ 2.53
Logistics revenue and revenue related to absence of logistics nominations $ 28,000                    
Number of customers | customer 1                    
Lease exit and termination expenses $ 80,700               $ 80,665    
Goodwill and long-lived asset impairment   $ 149,900             149,972    
Net loss on sale and disposition of assets $ 6,500 7,500 $ 400 $ 6,100         $ 20,495 $ 2,097 $ 2,182
Loss due to customer dispute               $ 5,000      
Restructuring charge to expense               2,300      
Noncontrolling Interest                      
Unaudited quarterly financial data                      
Goodwill and long-lived asset impairment   35,800                  
Warren Equities Inc                      
Unaudited quarterly financial data                      
Acquisition related costs incurred             $ 1,000 $ 4,400      
Capitol Petroleum Group                      
Unaudited quarterly financial data                      
Acquisition related costs incurred         $ 300 $ 100 $ 3,100        
Parent Company [Member]                      
Unaudited quarterly financial data                      
Goodwill and long-lived asset impairment   $ 114,100