To retreive IP address programmatically the /text endpoint can be used. It returns IP address in a plain text format: