Members of the rescued soccer team and their coach sit during a press conference discussing their ordeal in the cave in Chiang Rai, northern Thailand, Wednesday, July 18, 2018.

The 12 boys and their soccer coach rescued from a flooded cave in Thailand waved, smiled and offered traditional "wai" greetings in their first public appearance on Wednesday at a national broadcast in the northern province of Chiang Rai.

Doctors, relatives and friends, some in yellow traditional garb, greeted the boys, aged 11 to 16, and their 25-year-old coach, who wore T-shirts emblazoned with a red graphic of a wild boar and carried in footballs they kicked gently on the set.

"Bringing the Wild Boars Home," read a banner in Thai on the set, designed to resemble a soccer field, complete with goalposts and nets, where the boys arrayed themselves on a dais, beside five members of the rescue team.

A crowd of media and onlookers was penned behind barricades as the group arrived in vans from the hospital where it has stayed since last week's international effort to extricate it from a flooded cave complex where it had been trapped.

"Today we will get the answers to the questions we have been wondering, from the boys themselves," said Suthichai Yoon, presenter of the 45-minute programme being televised live on dozens of channels.

The boys, who sported crisp haircuts, had gained an average of 3 kg (6.6 lb) each since the rescue, and rain through confidence-building exercises ahead of Wednesday's event, the hospital director said.

The boys, their coach and some rescuers will answer a series of questions journalists submitted in advance, officials said.

"We don't know what wounds the kids are carrying in their hearts," said justice ministry official Tawatchai Thaikaew, who asked for the boys' privacy to be respected after the discharge, for fear that media attention could affect their mental health.

"The media know the children are in a difficult situation, they have overcome peril and if you ask risky questions then it could break the law," he told reporters.

The group had planned to explore the Tham Luang cave complex for about an hour after soccer practice on June 23. But a rainy season downpour flooded the tunnels, trapping them.

Two British divers found them on July 2, squatting on a mound in a chamber several kilometres inside the complex. All were brought to safety during the three-day rescue, organised by Thai navy SEALs and a global team of cave-diving experts.

The rescue effort drew global media attention and hundreds of journalists, many of whom left after it wrapped up, but excitement picked up again in the usually sleepy town of Chiang Rai ahead of the much-anticipated appearance.

King Maha Vajiralongkorn has granted permission for a party in the Royal Plaza, a public square in Bangkok's old town, to thank the Thai and foreign participants in the rescue, the government said.

Earlier, Prime Minister Prayuth Chan-ocha told reporters the celebration would feature a banquet and entertainment, but gave no further details.