All you have to do is GET one of these URLs:
http://api.automeme.net/texthttp://api.automeme.net/htmlhttp://api.automeme.net/text.jsonhttp://api.automeme.net/html.jsontext may be abbreviated to txt.
text and html both return a list of memes,
separated by newline characters (\n).
Memes may be returned as a JSON list object by appending
.json to the URL.
There are some differences between text and
html output:
text |
html |
||
|---|---|---|---|
| Emphasis | _DERP_ |
<em>DERP</em> |
DERP |
| Smart quotes | IT'S |
IT’S |
IT’S |
| Ellipsis | ... |
… |
… |
| Em dash | -- |
— |
— |
| Snowman | SNOWMAN |
☃ |
☃ |
As illustrated here, html uses some HTML entities,
and <em> for emphasis, while text will try to
use the ASCII equivalents. Regardless, all output is UTF-8
encoded.
The underscore character is used exclusively for emphasis in
text output, and can be safely removed.
Ten memes are returned by default. This can be changed by appending
?lines=n to the URL, where n is a
number in the range 1–80. For example: http://api.automeme.net/text?lines=25
Significant changes to the API will be posted to the Auto-Meme blog.
Don't hammer the server plz thx. <3
curl api.automeme.net/text?lines=1
or
wget -q -O - api.automeme.net/text?lines=1
var url = 'http://api.automeme.net/text.json',
memes = [];
$.getJSON(url, function(result) {
memes = result;
console.log(result[0]);
});
import urllib
url = 'http://api.automeme.net/text'
memes = urllib.urlopen(url).read().rstrip().split('\n')
print memes[0]
require 'open-uri'
url = 'http://api.automeme.net/text'
memes = open(url).read.split("\n")
puts memes.first
use LWP::Simple;
getprint 'http://api.automeme.net/text?lines=1';
Old API commands are still supported:
| Current API | Old API |
|---|---|
/text |
/moar.txt |
/html |
/moar.html |
/text.json |
/moar.txt.json |
/html.json |
/moar.html.json |
The domain names automeme.net and
meme.boxofjunk.ws can still be used, but only the old commands
will work with these.
Ruby example by jamiew. Perl example by perigrin.
« Return