From the MediaWiki action API I could get the list of all articles in a category or other subcategories in a category. However can you please help me how to obtain a list of all categories which a given article belong to? It's sufficient to list just the immediate parent Category of an article.
The Categories query module of the API does that. Use something like
…?action=query&prop=categories&titles=…