api handles location param.