The subject area is a part of the atom feed response, but is not available for querying. If you need a bulk metadata set that is category dependent, I would recommend against using the search API, and instead harvest via the OAI-PMH (
info.arxiv.org/help/oa/index.html) or look at the Kaggle data set (
https://info.arxiv.org/help/bulk_data.html#kaggle-full-text). The search API is more based around the idea of looking for metadata that contains a particular topic keyword. Alternatively, if you are looking for keywords in your search, you can then filter out anything not in the machine learning categories by only looking at papers with the <arxiv:primary_category * term="cs.LG"> element present.
Best,
-Jake Weiskoff
arXiv Technical Support Manager