Api call script extended