Hello,
The following link contains the api of generatedata . It has also all the usage information regarding the api . It is of the site itself and I think that they permit its usage for other UI's . I think it is a good idea to use this api to implement this feature.
Any suggestions are welcome.