The Interweb.WTF CLI API is a simple API that allows you to interact with the most basic features of the Interweb.WTF service.
https://www.interweb.wtf/cli/v0
Note: The Interweb.WTF CLI API uses the /cli
pathname for all endpoints
instead of a more traditional /api
pathname as a reminder that these routes
are mostly for CLI applications that only expect to be able to send and receive simple
text rather than fully-featured API responses.
The Interweb.WTF CLI API uses an Authorization HTTP Header with a Bearer Token.
Authorization: Bearer wtf_v0_abcdefghijklmnopqrstuvwxyz0123456789
Note: In all of the example requests you should replace $API_KEY
with an API
Key you generated in Settings > Developer.
curl --header "Authorization: Bearer $API_KEY" \
--location "https://www.interweb.wtf/cli/v0/go?\
url=https://www.interweb.wtf/go/patient-recipe"
By default, the API will return a text/plain
response:
https://interwebalchemy.com/posts/building-a-chess-tutor/
You can also add /json
to the endpoint URL to get a JSON response:
{
"url": "https://interwebalchemy.com/posts/building-a-chess-tutor/"
}