This is a webhook implementation that gets JSON Wikipedia extracts for api.ai. This code is based on the api.ai yahoo weather webhook sample. You can see it here: https://github.com/api-ai/apiai-weather-webhook-sample .
More info about Api.ai webhooks could be found here: Api.ai Webhook
Gets instant answers for api.ai chat using Wikipedia API.