While the intake of larger quantities of vegetables has been linked to a reduction in constipation risk, which vegetables in particular underlie this risk reduction remains incompletely understood. As such, the present study was developed to explore correlations between the intake of particular vegetable types and the risk of constipation. This cross-sectional analysis was based on data from the National Health and Nutrition Examination Survey (NHANES) collected from 2005-2010. Classifications and intake assessments for different vegetables were assessed with the Food Patterns Equivalents Database (FPED), while stool frequency or stool consistency was used to define constipation. Relationships between the intake of particular vegetable components and constipation were assessed through a weighted logistic regression approach. Subgroup and restricted cubic spline (RCS) regression analyses were further employed to explore associations between specific vegetable subtypes and constipation. This study included 13,860 eligible subjects, of whom 1,405 and 12,455 were respectively classified into the constipated and non-constipated groups. Following multivariate adjustment, the intake of non-starchy vegetables including orange, red, dark green, and other vegetables was found to be positively associated with a reduction in constipation risk. In contrast, constipation was unrelated to total starchy vegetable or potato intake. Tomatoes, in particular, were associated with a marked decrease in constipation risk (odds ratios: 0.80, 95% confidence interval: 0.71-0.91). These results were confirmed through RCS and subgroup analyses. Non-starchy vegetables, particularly tomatoes, were found to be associated with a pronounced reduction in constipation risk, which was unaffected by the intake of potatoes or starchy vegetables.