Japan logged a ¥1.04 trillion ($9.3 billion) trade surplus in the first half as exports surged to Asia, but their value shrank from a year ago as imports of crude oil grew, government data showed Thursday.

In the January-June half, exports rose 9.5 percent to ¥37.79 trillion, lifted by shipments of semiconductor equipment, auto parts and iron and steel. Imports rose 12.2 percent to ¥36.74 trillion in value terms.

The trade surplus is Japan's third straight for a six-month period. Compared with a year ago, however, the surplus shrank 41.1 percent due in large part to a surge in the value of oil imports. Resource-scarce Japan relies heavily on energy imports.