SupriyaK, did you get it working? I'm having the same problem. I've tried many things, nothing works.
item_search = gis.content.search(query="", categories="/Categories/My Category")
item_search = gis.content.search(query="", categories=["/Categories/My Category"])
cat="/Categories/My Category"
item_search = gis.content.search(query="", categories=cat)
item_search = gis.content.search(query="", categories=[cat])
I had spaces in my category name, tried renaming without spaces, still nothing. Tried the query as empty string and with * wildcard, nothing.