Use API_TABLE to mapping function
Add error handling
Add getSuggestion
Add get_api_callback
Fix indent