Gut microbiota plays an important role in host physiology such as obesity, diabetes, and various neurological diseases. Thus, microbiome sampling is a fundamental approach towards better understanding of possible diseases. However, conventional sampling methods, such as endoscopies or colonoscopies, are invasive and cannot reach the entire small intestine. To address this need, a batteryless 3D-printed sampling capsule, which can collect microbiome samples throughout the entirety of the GI tract was designed. The capsule (9 mm  15 mm) consists of a 3D printed acrylic housing, a fastabsorbing hydrogel, and a flexible PDMS membrane. Fluids containing samples of the microbial flora within the GI tract enter the device through a sampling aperture on the cap of the device. Once the microbiome enters the housing, the hydrogel absorbs the fluid and swells, effectively protecting the samples within its polymeric matrix, while also pushing on the flexible PDMS membrane to block the sampling aperture from further fluid exchange. The retrieved capsule can be readily disassembled due to the screw-cap design of the capsule and the hydrogel can be removed for further bacterial culture and analysis. As a proof of concept, the capsule's bacterial sampling efficiency and the ability to host microbial samples within the hydrogel in a sealed capsule were validated using a liquid culture containing Escherichia coli. The demonstrated technology provides a promising inexpensive tool for direct sampling and assessment of microbes throughout the GI tract and can enable new insights into the role of diet in mediating host-microbe interactions and metabolism.