api for analysis