pip install itchat

Note: the API changes quite often, but documentations does not. What I suggest is install from git:

git clone

and stick to a stable version (current version: v1.3.9, July 15, 2017).


import itchat



  • UserName (string): a long string that starts with ‘@’
  • City (string): city
  • DisplayName
  • UniFriend
  • MemberList
  • PYQuanPin
  • Province (string): province
  • RemarkName (string): the remark name of the person (input by yourself)
  • ChatRoomId
  • AttrStatus
  • MemberCount
  • Alias
  • Signature (string): signature
  • NickName (string): the name of the person
  • HeadImgUrl (string): a relative url to the head image
  • Sex (int): 1 for male; 2 for female; (default 0)
  • StarFriend
  • Statues



Friends API


returns a object, which contains a list object.



Message API

itchat.send(message: string, username: string)