More than 600 people were injured during the magnitude 6.2 quake, which sent people fleeing their homes in the darkness. Authorities were still collecting information about the full scale of casualties and damage in the affected areas.
There were also reports of many others trapped in the rubble of collapsed homes and buildings.
In a video released by the National Disaster Mitigation Agency, a girl stuck in the wreckage of a house cried out for help and said she heard the sound of other family members also trapped.
"Please help me, it hurts," the girl told rescuers, who replied that they desperately wanted to help her.
The rescuers said an excavator was needed to save the girl and others trapped in collapsed buildings. Other images showed a severed bridge and damaged and flattened houses. TV stations reported the earthquake also damaged part of a hospital and patients were moved to an emergency tent outside.
Another video showed a father crying, asking for help to save his children buried under their toppled house. "They are trapped inside, please help," he cried.
Thousands of displaced people were evacuated to temporary shelters.
The quake was centered 36 kilometers (22 miles) south of West Sulawesi province's Mamuju district, at a depth of 18 kilometers (11 miles), the U.S. Geological Survey said.
The Indonesian disaster agency said the death toll climbed to 34 as rescuers in Mamuju retrieved 26 bodies trapped in the rubble of collapsed buildings. The agency said in a statement that eight people were killed and 637 others were injured in Mamuju's neighboring district of Majene.
Rescuer Saidar Rahmanjaya said a lack of heavy equipment was hampering the operation to clear the rubble. He said his team was working to save 20 people trapped in eight buildings, including in the governor's office, a hospital and hotels.
"We are racing against time to rescue them," Rahmanjaya said.
Download the NBC News app for breaking news and politics
President Joko Widodo said in a televised address that he had ordered his social minister and the chiefs of the military, police and disaster agency to carry out emergency response measures and search and rescue operations as quickly as possible.
"I, on behalf of the Government and all Indonesian people, would like to express my deep condolences to families of the victims," Widodo said.
Two ships were heading to the affected areas carrying rescuers and equipment, while a Hercules plane with supplies was on its way from the capital, Jakarta.
The rescue team are already leading more than 4,100 personnel in a separate search operation for victims of the crash of a Sriwijaya Air jet into the Java Sea last Saturday.
Indonesia, a vast archipelago of 260 million people, is frequently struck by earthquakes, volcanic eruptions and tsunamis because of its location on the "Ring of Fire," an arc of volcanoes and fault lines in the Pacific Basin.