They meet potential leads in cafés, at markets, and sometimes even in their own homes. Social skills are a must; you need to be chatty to get people to open up about the kidnappers in their midst.

The investigators have built up a network of informants. They regularly receive tip-offs that another kidnapping has occurred.

But this can be dangerous. When the victims of kidnapping are rescued, the criminals will often seek out the people who tracked them down, and try to get revenge. To protect themselves, the investigators all have undercover stories, meticulously constructed to help them blend in.

This is the life led by Indonesia's undercover wildlife crime investigators. Over the last 10 years they have rescued hundreds of orangutans that have been illegally captured and sold to the highest bidder. The trade is a lucrative one, and the investigators face an uphill battle. But after a decade of work, they think they know the scale and nature of the problem – and how to save the orangutans from extinction.

Edi Rahman is one of these investigators, working for the Gunung Palung Orangutan Conservation Program (GPOCP).

He says getting local people's trust has been crucial. To help with that, the GPOCP provides educational programmes, visits schools, and hosts community discussions and field trips.

When cases are reported and then a confiscation occurs, they are upset and will often search for who conveyed this information

Now it has informants in every village in the area. "If an informant has information, they will contact our investigation team, who will then visit the location to collect more information for the formal report," says Rahman.

But the risk of blowback is real. "People who keep orangutans as pets are very attached to the animal," says Rahman. "They have spent money on care, meals and other maintenance costs. When cases are reported and then a confiscation occurs, they are upset and will often search for who conveyed this information."

If that sounds like a serious operation, it is. Wildlife crime is considered the fourth most lucrative black-market industry in the world. It is worth about $19bn (£15.4bn) a year. And orangutans are some of the criminals' most vulnerable targets.

There are two species of orangutan, separated by geography. Bornean orangutans are only found, as their name would suggest, on the Indonesian island of Borneo. They are critically endangered. Similarly, Sumatran orangutans are confined to the neighbouring island of Sumatra, and are also critically endangered.

A new report, published in the American Journal of Primatology, tracks 10 years of investigations into wildlife crime affecting Bornean orangutans. It identifies two key factors that have contributed to the trade in life orangutans.

Poaching is an indirect effect of deforestation

First, local people want them as pets. "What they say is that they find them in the forest and keep them in their homes, because they 'feel bad for them'," says Cathryn Freund, formerly of GPOCP and now at Wake Forest University in North Carolina, US.

Second, the forests they live in are being cut down, often to make way for palm oil plantations. This in turn leads to more poaching and therefore trading of the animals. The more forest that is removed for palm oil, the easier it is to get to the orangutans.

"In a way the poaching is an indirect effect of deforestation," says Freund. "The animals aren't killed by deforestation, [but] It indirectly fuels the trade by providing more access to the forests for anyone."

The poachers are not specifically hunting orangutans, focusing instead on bushmeat. But if orangutans are discovered, they are often taken in order to be sold as pets. Keeping a great ape is also seen as a "status symbol" among the wealthier classes, says Freund.

Freund and her colleagues have also estimated the scale of the illegal orangutan trade.

Over the 10-year period of the study, 145 illegally-kept orangutans were discovered. This only represents about 11-14 orangutans per year, but the study was solely focused on a small corner of Indonesian Borneo called Kalimantan. "If you extrapolate that figure, it's a lot of orangutans," says Freund.

Far more apes are either killed during the hunt or die in captivity than are ever confiscated

In fact, a 2013 report by the Organized Crime and Corruption Reporting Project estimates that orangutans are poached more heavily than the other great apes. From 2005 to 2011, about 1,019 orangutans were taken from the wild – compared to 643 chimpanzees, 48 bonobos and 98 gorillas.

This probably does not even represent the full scale of the problem. The same report states that "far more apes are either killed during the hunt or die in captivity than are ever confiscated, and law enforcement and customs officials admit that only a fraction of any contraband is ever seized." Many orangutans are also killed for bushmeat, a practice that has been common in Indonesia for thousands of years.

Despite this, many people in Indonesia may not be aware that there is even a problem.

Compared to the other animals hunted, relatively few orangutans are killed per year. A small village may only come across a killing every two years.

The closer to the jungle people live, the more remote they are. "There is no internet, limited electricity and a lot of the communities are very poor," says Terri Breeden, GPOCPprogram director. "It's hard to reach these really remote communities. They don't know [orangutans] are endangered… They don't know the laws, some are still hunting them."

The Indonesian government needs to immediately revise its wildlife protection laws

This lack of awareness has helped contribute to local extinctions and could wipe out Bornean orangutans for good, according to a 2016 analysis of great ape conservation strategies.

Researchers looked at almost 200 publications. They say that "many conservation scientists, NGOs, local communities, and government officials publicly doubt the magnitude and severity of the orangutan killing problem." This is in part because it is considered a "sensitive" issue, as many of the killings are for food.

To make matters worse, in early 2016 Bornean orangutans were reclassified as critically endangered by the International Union for Conservation of Nature. That is the most severe level of extinction risk.

Freund's study of orangutan-based wildlife crime should make it harder to ignore the problem. It also offers hints as to how the orangutans might be saved.

Based on her investigation, Freund now offers several recommendations.

First, she says the Indonesian government needs to immediately revise its wildlife protection laws – something it has already pledged to do – and to make punishments more severe.

It will also be necessary to persuade people to take better care of orangutans

Second, Freund recommends that people working in law enforcement need to be more accountable for crimes against orangutans. There have been cases of law enforcement officers themselves hunting or buying apes for pets. Freund recommends an internal evaluation process to "root out the people who aren't good at their jobs and promote those that are".

This ultimately boils down to a need for more money, especially as Indonesia is a "hotspot for live animal trade". Rescuing a single orangutan can cost $500, and that does not even cover the rehabilitation they need afterwards. Local regions are rarely given anything like enough. In Kalimantan alone, Freud's team recommends an additional $3m per year for law enforcement.

Finally, Freund says that enforcing laws will only go so far. It will also be necessary to persuade people to take better care of orangutans. For that reason, she recommends educational programmes for both children and adults.

There is one other positive thing that could come from the study of crimes against orangutans: the plight of Indonesia's dwindling orangutan population may act as a warning signal for other areas where palm oil crops may be planted.

One worrying example is the already fragile population of bonobos, which along with chimpanzees are our closest living relatives. Bonobos are already an endangered species. They all live in the Democratic Republic of Congo, and their habitat almost entirely overlaps with areas that are suitable for palm oil plantations. 

"That's a major point of concern for these bonobos," says Freund.

Conservationists are hopeful that the sad story that has played out for Indonesia's orangutans will not be repeated with Africa's bonobos. And thanks to the detailed information they now have, it may yet be possible to save the orangutans.

Melissa Hogenboom is BBC Earth's feature writer. She is @melissasuzanneh on Twitter.

Join over six million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.