Documentation
# Introduction
It is a free API that you can use in your projects. We have several easy-to-use, useful endpoints gathered in one place.
It is not required, but if you decide to use it, it would be nice if you included a note in your project with a link to this page. Thank you for appreciating my work.
Default path: https://open-api.klonba.xyz/api/
If you have created some serious project that depends on this API and would like it to be linked on this page, please contact the administrator, preferably via Discord.
# Ratelimits
The default ratelimit is 15 queries per minute. This is a limit per endpoint, so in a minute, you can make 15 queries to each API endpoint.
If for any reason you need to increase this limit, please contact the administrator to obtain an API key.
Keep in mind that in some cases we also use external APIs that also have their limits.
# Deprecated
Some endpoints are deprecated. They are marked accordingly in the documentation.
Deprecated endpoints may still work, but we do not guarantee their correct and stable operation. They are described in less detail in the documentation. Normally, an endpoint is marked as deprecated when a new version is released (e.g. with a v2 prefix).
Deprecated endpoints may stop working or be disabled. We advise against using them in production.
# Libraries
We have some libraries, which will allow you to use our API easier and faster:
Endpoints
# Cryptocurrency rates
GET /api/v2/crypto
Returns the rates of the most popular cryptocurrencies with the float.
Source: BitForex
Examples:https://open-api.klonba.xyz/api/v2/crypto
DEPRECATED GET /api/crypto
# Weather forecast
GET /api/v2/weather/:type/:lang/:units
Returns 5 day / 3 hour weather forecast for specified place. Provides detailed information about temperature, pressure, humidity, cloudiness, rain, snow, wind.
Parameters:- type -
city
(for place) orlocation
(for lat and lon) - lang - language code (e.g.
en
,es
,de
etc) - units -
c
(for Celsius and meter/sec) orf
(for Fahrenheit and miles/hour)
- place - city name (e.g.
London
,Madrid
) - only if using city parameter - lat and lon - coordinates - only if using location parameter
https://open-api.klonba.xyz/api/v2/weather/city/pl/c?place=London
https://open-api.klonba.xyz/api/v2/weather/location/es/f?lat=40&lon=-4
Source: OpenWeatherMap
DEPRECATED GET /api/weather/:type/:lang/:units
# News feed
GET /api/news/:lang/:country/:topic
Returns articles from Google News.
Parameters:- lang - language code (e.g.
en
,es
,de
etc) - country - country code (e. g.
gb
,us
,br
etc) - topic - topic of articles: (see below)
ALL
WORLD
NATION
BUSINESS
TECHNOLOGY
ENTERTAINMENT
SPORTS
SCIENCE
HEALTH
- q - query for search in articles
https://open-api.klonba.xyz/api/news/en/us/TECHNOLOGY
https://open-api.klonba.xyz/api/news/pt/br/SPORTS
https://open-api.klonba.xyz/api/news/en/gb/ALL?q=spacex
Source: Google News
# RSS feed parser
GET /api/feed
Returns articles from given RSS feed channel.
Queries:- url - full url for RSS feed (xml)
https://open-api.klonba.xyz/api/feed?url=https://ozelot.ovh/rss.xml
https://open-api.klonba.xyz/api/feed?url=http://rss.cnn.com/rss/cnn_latest.rss
It does not work for all RSS feeds.
# Song lyrics
GET /api/v2/lyrics
Returns information about specified song and lyrics.
Queries:- q - query (e.g. song title and author)
- limit - how many results to display (the more, the longer the query will take), default 1
- onlyLyrics - return only lyrics from one best result
https://open-api.klonba.xyz/api/v2/lyrics?q=faded
https://open-api.klonba.xyz/api/v2/lyrics?q=adele&limit=3
https://open-api.klonba.xyz/api/v2/lyrics?q=im good blue&onlyLyrics=true
Source: Musixmatch
DEPRECATED GET /api/lyrics
# Moon phase
GET /api/moon
Returns current or date information: moon phase, moon phase's icon, age, distance, ecliptic, trajectory and constellation.
Examples:https://open-api.klonba.xyz/api/moon
# Images and memes generator
GET /api/canvas/:type
Generates pictures and memes with the given text.
Parameters:- type - template: (see below)
cyberpunk
- queries: textstonks
- queries: imgnotstonks
- queries: imgdrake
- queries: line1, line2brain
- queries: line1, line2, line3gru
- queries: line1, line2, line3alwayshasbeen
- queries: line1, line2balloon
- queries: person1, person2, balloonbellcurve
- queries: line1, line2boyfriendlookingback
- queries: man, woman, anotherwomancoupleinbed
- queries: line1, line2disappointedguy
- queries: line1, line2drift
- queries: line1, line2, line3grimreaper
- queries: door1, door2, door3, door4, reaperthenvsnow
- queries: title1, title2, desc1, desc2
https://open-api.klonba.xyz/api/canvas/stonks?img=https://i.imgur.com/Ih6gNjO.png
https://open-api.klonba.xyz/api/canvas/brain?line1=use meme generator for making memes&line2=use paint for making memes&line3=use canvas for making memes
https://open-api.klonba.xyz/api/canvas/alwayshasbeen?line1=Klonba is a good bot&line2=always has been
https://open-api.klonba.xyz/api/canvas/boyfriendlookingback?man=average discord server admin&woman=mee6 and other bots with paid options&anotherwoman=klonba
https://open-api.klonba.xyz/api/canvas/drift?line1=some large and popular bots&line2=Klonba discord bot&line3=me
# Discord information
GET /api/discord/:type
Returns information about Discord object by ID.
Parameters:- type - type of object (supported:
USER
, more coming soon)
- id - object ID (snowflake)
https://open-api.klonba.xyz/api/discord/user?id=328902624738934784
# Radio played
GET /api/v2/radio/:country/:station
Returns a list of songs that were last played on a given radio station.
Parameters:- country - country code (supported:
PL
,DE
,SK
,RO
,AT
) - station - name of radio station copied from URL of source website, for example from
https://open-api.klonba.xyz/api/v2/radio/de/1live
take1live
https://open-api.klonba.xyz/api/v2/radio/de/1live
https://open-api.klonba.xyz/api/v2/radio/pl/rmf-maxxx
Source: myradioonline.pl, myradioonline.de, myonlineradio.sk, myradioonline.ro, myonlineradio.at.
DEPRECATED GET /api/radio/:station
# TV Program [PL]
GET /api/television/:station
Returns the TV program for the given station.
Parameters:- station - name of TV station or ALL (
ALL
,TVP_1
,TVP_2
,POLSAT
,TVN
,TVN_SIEDEM
)
- extended - more detailed information
https://open-api.klonba.xyz/api/television/POLSAT
https://open-api.klonba.xyz/api/television/TVN?extended=true
Source: Teleman