Light, sweet crude for August delivery closed $1.10 higher at $87.50 a barrel on the New York Mercantile Exchange.
GDP data shows China's economic growth declined to 7.6 percent, in line with forecasts, but investors had feared the numbers would be worse.
Henry Hub natural gas was steady at $2.88 per million British thermal units.
Home heating oil was up 0.57 percent to $2.789 per gallon.
Reformulated blendstock gasoline was up 0.37 percent to $2.80.99 a gallon.
At the pump, the national average price of unleaded gasoline was $3.38 per gallon Friday, AAA said.
Biologists detail four new deep-sea 'killer sponges'
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend