I have a list of place names (300+), which are mostly cites and states/provinces in United States and Canada. I would like to get the administrative boundary for them. I know the raw boundary data is downloadable from the government website but I wonder if there is any convenient service to search and download using API or a UI.
Your best bet for up-to-date boundary files at the provincial/state and municipal/county level for the world is the Global Administrative Boundaries Project. Unless you're looking for a specific Canadian/American boundary type (Economic Regions, Special Counties?) this data set should be fine. All data can be downloaded directly through their website.
Alternatively, if you're working in R, the 'sp' package fully integrates the GADM data, offering an API-like method for downloading and presenting the data. More info on how to do that can be found in the GIS SE (e.g. https://stackoverflow.com/a/30024321)