HPAI is endemic across parts of Indonesia, but the mechanisms of viral persistence in the poultry production system have not been well investigated. This mixed methods research conducted in Purbalingga District, Java characterised poultry populations and trade and contact networks and performed risk-based sampling for the active detection of HPAI virus in live bird markets, collector yards, backyard poultry, nomadic ducks and commercial farms. Approximately 60% of households kept birds, about half of which contributed towards household income. Traders tended to use multiple collector yards and live bird markets, and poultry might be presented at multiple markets before sale. Only the commercial farm sector implemented biosecurity practices and vaccination. Samples were screened for avian influenza virus (AIV) and positive samples were tested for the H5 and H9 sub-types. H5 virus was detected in all enterprise types, although there were few positive results in commercial farms, the backyard sector and nomadic duck flocks. The highest numbers of AIV, H5 and H9 viruses were found in the live bird markets and collector yards. The odds of detection of H5 in live bird markets and collector yards were similar; however, these were 3½ to 4 times higher than in backyard birds and nomadic ducks and 25 to 30 times higher than in commercial poultry. This suggests that transmission of infection in backyard poultry and duck production was likely to be driven more strongly by the value chain than by direct or indirect contacts at source. We could not determine whether the value chain concentrates or amplifies virus along its length, or whether AIV persists and actively circulates in live bird markets and collector yards. H5 and H9 viruses were detected year-round and were co-circulating in the different enterprise types, although no inference can be drawn regarding interactions between these HPAI and LPAI viruses.