Microservice Recipe: URL To Text

Service Recipes > URL To Text
04 Oct 2017

Extract web page content for a given URL.

This recipe demonstrates how to develop a microservice for automatic content extraction from a web page using  Node Readability NPM package by Zihua Li.



Extract content for a given URL.


urlSTRING, REQUIRED - the url of the page for content extraction.


Example Request

Here we take an example web page url e.g."http://time.com/4968831/google-home-mini-release-date/", URL encode and send as a request parameter using an HTTP GET request:

curl -H "Content-Type: application/json" \
-H "Authorization: Bearer {SERVICE_TOKEN}" \

Example Response

"Google will release a smaller version of its Home smart speaker, the company revealed during an event on Wednesday. The device, called the Google Home Mini, will cost $49 and launches on October 19.\nLike the larger Google Home, the Mini is partially made of fabric and will be available in multiple colors. There are four LED lights underneath the the fabric that illuminate when the device is listening. Google says the Home Mini will be capable of connecting to any Chromecast compatible speaker and can project audio in 360 degrees. The speaker will be available in light grey, dark grey, and orange color options.\nThe Google Home Mini is a direct competitor to Amazon's Echo Dot, a smaller version of Amazon's smart speaker that is also priced at $49. Google's announcement comes after Amazon unveiled several new Echo speakers last week, including a new model with improved speakers and an Echo that's tailored for smart home control.\nGoogle says the Home Mini will be available for preorder starting on Wednesday. The company also announced a few enhancements coming to the Google Assistant, such as a new feature that enables it to help you find your phone. Google is also debuting new family-friendly experiences for the Google Assistant, such as additional trivia options geared toward children."

Get Started For Free

Get Started