140it API

The 140it API is easy to use. It accepts a text string and shrinks it until it is less than char_max characters long (char_max's default is 140).


Basic Usage

http://140it.com/api/shrink?text=hello
Note that the text parameter needs to be URL-escaped.


Required Parameters

text
The text you want reduced. Must be URL-escaped.


Optional Parameters

char_max
How many characters you want text reduced to. Default is 140.
Example: http://140it.com/api/shrink?char_max=6&text=therefore

remove_vowels
Remove vowels to reduce text. Default is False.
Example: http://140it.com/api/shrink?remove_vowels&char_max=4&text=today

use_stocktwits
Convert company names to stocktwits ticker (e.g. Google to $goog). Default is False.
Example: http://140it.com/api/shrink?use_stocktwits&char_max=5&text=Google

callback
Supports an optional callback specifier.
Example: http://140it.com/api/shrink?use_stocktwits&char_max=5&text=today&callback=do_something


Output

The output is in json format

http://140it.com/api/shrink?char_max=18&text=I%20think%20therefore%20I%20am

{
  "new":"I think there4 I'm",
  "old":"I think therefore I am",
  "success":1,
  "new_len":18,
  "old_len":22
}