The blast at the mine in Sawah Lunto district sent flames 50 metres into the air and left a huge crater on the surface, officials said.
Rustam Pakaya, the head of the health ministry's disaster centre, said in a telephone text message that 28 miners were confirmed dead, with eight still in hospitals, one discharged and 12 still missing.
Jasman, the local police chief, said the prospect of finding more survivors in the mine were fading.
Indonesia has rich mineral resources with many coal and other mines, but often tends to use open-pit mining rather than underground mining.
The mine hit by the explosion was locally owned and produced only about 1,500 tonnes of coal a month and supplied local paper and power companies.
Indonesia, which is the world's largest thermal-coal exporter, is expected to produce around 230 million tonnes of coal this year, according to a government estimate.
Rock slides and a mix of gas and coal debris rescue workers to resurface after four hours of digging, the district police chief in West Sumatra province said by phone from the scene.
Nine survivors were still being treated, two of them in critical condition, an official from the health ministry's disaster centre said.
Police were trying to determine what caused the blast. A preliminary investigation said it was triggered by leaking methane gas.
The mine is 900km northwest of the capital, Jakarta.