Added reading of tag in both python code and api code.