Official Automeme Enterprise API

Where the memes at?

All you have to do is GET one of these URLs:

Format

There are some differences between text and html output:

text html
Emphasis _DERP_ <em>DERP</em> DERP
Smart quotes IT'S IT&rsquo;S IT’S
Ellipsis ... &#8230;
Em dash -- &mdash;
Snowman SNOWMAN &#9731;

Parameters

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

If you liked Automeme before it was cool, use the vocab=hipster parameter for some unique hipster words.

Further info

Significant changes to the API will be posted to the Automeme blog.

Diving in

From a shell

curl api.automeme.net/text?lines=1

Javascript with jQuery

var url = 'http://api.automeme.net/text.json',
    memes = [];
$.getJSON(url, function(result) {
    memes = result;
    console.log(result[0]);
});

Python

import urllib
url = 'http://api.automeme.net/text'
memes = urllib.urlopen(url).read().splitlines()
print memes[0]

Ruby

require 'open-uri'
url = 'http://api.automeme.net/text'
memes = open(url).read.split("\n")
puts memes.first

Perl

use LWP::Simple;
getprint 'http://api.automeme.net/text?lines=1';

PHP

$url  = 'http://api.automeme.net/text?lines=1';
$meme = file_get_contents($url);
echo $meme;

Legacy API

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 for now, but only the old commands will work with these.

Credits

Ruby example by jamiew. Perl example by perigrin. PHP example by epochblue.


« Return