Deployable API for searching really nice memes on the web.
Need a funny API to make coding examples? Want to create a telegram bot that sends memes (already did it)? A meme API will serve your needs. But hey, as the holy bible of internet memes knowyourmeme doesn't provide a public API to their data, what should we do? If you said write a web scraper to fetch those data you're absolutelly right and that's Meme.js!
To make it completely ready for you to deploy your own instance, i'm not using any sort of database or config files on this project, just clone it, run /dist/src/index.js with node and you're good to go.
Of course if you want to disponibilize for the general public you'll need a VPS or some sort of hosting with a really cool domain name like i don't know... http://thememeapi.online
Like i've said, my purpose with Meme.js was to serve a fun and simple meme API and the domain name was cheap so here it is
The live base url is https://thememeapi.online
- Description: returns a random meme JSON
- Method: GET
- Format:
{
"src": "image source (string)",
"title": "meme name / image title (string)"
}
NOTE: for searches containing more than one word, use '+' to separate them in the url
- Description: returns the image of the first result on relevance filter from given string
- Method: GET
- Format:
{
"src": "image source (string)",
"title": "meme name / image title (string)"
}
- Description: returns the definitions of a random meme
- Method: GET
- Format:
{
"title":"Meme name",
"about":"First paragraph from the about section",
"origin":"First paragraph from the origin section",
"image":"Meme image"
}
NOTE: for searches containing more than one word, use '+' to separate them in the url
- Description: returns the definitions of a meme from given string
- Method: GET
- Format:
{
"title":"Meme name",
"about":"First paragraph from the about section",
"origin":"First paragraph from the origin section",
"image":"Meme image"
}
NOTE: this is redirect, i've warned you.
Description: redirects you to a random meme page on knowyourmeme
NOTE: this is redirect, i've warned you.
Description: redirects you to a random image file on knowyourmeme
To build the project you'll need npm (assuming you're on the project root)
npm install
npm run build
cd ./dist/src
node index.js 8000
If you want to run the server in another port just pass it as the first argument.