drewthoennes / bored-api Goto Github PK
View Code? Open in Web Editor NEWA simple and free API to find things to do when you're bored
Home Page: https://www.boredapi.com/
License: MIT License
A simple and free API to find things to do when you're bored
Home Page: https://www.boredapi.com/
License: MIT License
While deploying my application on Vercel, I noticed that the API being used follows the HTTP protocol. This causes the browser to block it. It works locally because it can send requests to other HTTP resources. However, the deployment on Vercel does not work.
I would like to fix the documentation and replace all instances of 'http' with 'https' for the URLs mentioned.
What data type should I use for participants
field? In the documentation its interval is [1, n]. What is the max possible n?
The documentation doesn't list these. I only saw the one example for recreational, so what are the others?
Is there a way to get more fields like kidFriendly
and duration
? or do these need to be added to the API still?
https://www.boredapi.com/ seems to have issues.
In another closed issue was mentioned, that there is a new API Endpoint, hence the README should be updated
Hi! Thanks for api, but I tried to use it and was getting CORS errors, finally figured out that instead of http://boredapi.com/api/activity/
i should use https://www.boredapi.com/api/activity/
, that is with www
part.
Maybe change example or server settings. I can elaborate if needed, with screenshots or code.
In About section of README, path is given for activities.json file. But there is no such file exist with name activities.json.
Hi there,
I don't see any mention of rate-limiting in the docs. I was wondering what the story is if I want to use the API in an app. Let's say there are like, 100 - 200 requests total a day from my users, would that be ok for you? I can't imagine that you could just absorb an unlimited amount of requests per day.
Please let me know how much a day is too much, so I can adjust my code and plans accordingly. ๐
Hi,
Any plans for creating GRPC APIs for the same ?
Showing application error in herkou while trying to open the link
It would be helpful if your continuums were bounded on both ends.
If accessibility 0 is "most accessible", is 1 "impossible"? This is really challenging to mentally parse. What is a 0.5 as opposed to a 0.6, for example? What precisely do you mean by "accessible"? Often this refers to people with disabilities. Is that the intent here?
If price 0 is "free", what is 1? "Prohibitively expensive"? Again, what's the difference between 0.5 and 0.6?
30
or whatever it might reasonably cost for one person to go to the movie and get popcorn.Still subjective, but if documented, would be more useful than the 0-1 scale.
Anyway, just some ideas.
Hey, I was just wondering if there is an endpoint to all of the activities in the database? I am trying to access all of them at once to then manipulate the data myself for a school project. Let me know if that endpoint exists. Thanks!
Looking at this sample output when requesting https://www.boredapi.com/api/activity
:
{
"activity":"Go to a concert with some friends",
"accessibility":0.4,
"type":"social",
"participants":4,
"price":0.6,
"key":"4558850"
}
Most of the numeric data is being returned as numbers, like price and participants. But key
field on an Activity is a string. Is this intentional? Is it safe to assume that this string contains only numbers and so can be stored in a big unsigned integer?
Thank you.
you get a heroku error
Can I filter with multiple parameters like:
activity?type=recreational&participants=3
Also, is the maximum number of participants 5?
Could there be a definitive statement somewhere that says "No API key is required to access this
content." ?
It looks like the Let's Encrypt certificate expired yesterday so HTTPS requests have issues:
Issued To:
Common Name (CN) www.boredapi.com
Organization (O) <Not Part Of Certificate>
Organizational Unit (OU) <Not Part Of Certificate>
Issued By:
Common Name (CN) R3
Organization (O) Let's Encrypt
Organizational Unit (OU) <Not Part Of Certificate>
Validity Period:
Issued On Tuesday, March 1, 2022 at 5:24:42 PM
Expires On Monday, May 30, 2022 at 6:24:41 PM
Fingerprints:
SHA-256 Fingerprint 4F 09 0A 4B B3 83 EF CD 48 92 80 15 9E 21 25 B3
04 B5 54 A3 F1 06 52 BA 99 F1 0E B0 36 13 DD 40
SHA-1 Fingerprint 7C E2 08 BC 40 8D 14 9E E1 9D 00 C6 BD 18 47 30
BA 53 A0 67
We're seeing this issue in Python apps where I work.
To reproduce, this fails:
from urllib.request import urlopen
API_URL = "https://www.boredapi.com/api/activity"
with urlopen(API_URL) as response:
result = response.read()
print(result)
With this traceback:
Traceback (most recent call last):
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/opt/Python-3.10.3/Lib/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/Python-3.10.3/Lib/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/Python-3.10.3/Lib/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/Python-3.10.3/Lib/http/client.py", line 1037, in _send_output
self.send(msg)
File "/opt/Python-3.10.3/Lib/http/client.py", line 975, in send
self.connect()
File "/opt/Python-3.10.3/Lib/http/client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/opt/Python-3.10.3/Lib/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "/opt/Python-3.10.3/Lib/ssl.py", line 1070, in _create
self.do_handshake()
File "/opt/Python-3.10.3/Lib/ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/daniel/junk/cert/main.py", line 5, in <module>
with urlopen(API_URL) as response:
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/opt/Python-3.10.3/Lib/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
It works fine if you change https
to http
in the URL though:
from urllib.request import urlopen
API_URL = "http://www.boredapi.com/api/activity"
with urlopen(API_URL) as response:
result = response.read()
print(result)
b'{"activity":"Write a short story","type":"recreational","participants":1,"price":0,"link":"","key":"6301585","accessibility":0.1}'
It would be useful to have an endpoint that can be queried to obtain a list of valid types of activities
For example:
http://www.boredapi.com/api/types
Response:
{
"types": ["education", "recreational", "social", "diy", "charity", "cooking", "relaxation", "music", "busywork"]
}
I have a quick question, I am using the api on an application which I want to share on the App Store.
Now Apple requires us to provide information on wether this application show or makes use of third-party content and if yes we need to have the rights to do so.
Is there any website or document that I should mention so Apple knows I have the necessary rights?
Thanks
The readme contains an about section as follow:
This project is an MEVN (MongoDB, Express.js, Vue.js, and Node.js) web app that has a goal of creating a simple way to find things to do. You do not need an API key to use this API, just query the endpoint to get data. All activities served by the API can be found here.
However, the link is dead. The here leads to a 404 page.
I'm not sure what the correct link is but it would be a simple fix. If someone provides me the link I can make a pr with the fix.
Is there a way to make an API request as Https?
Hi, I noticed that the range parameter names for accessibility are wrong way around.
It conflicts with the statements in the documentation that zero is MOST accessible."
"accessibility
A factor describing how possible an event is to do with zero being the most accessible
[0.0, 1.0]"
You can check it when using only 1 of the range parameters.
"MAXaccessibility"is actually the MINIMUM value up until zero (0).
and "MINaccessibility"is actually the MAXIMUM value up from one (1).
You wouldn't notice this when using both MINaccessibility and MAXaccessibility in one request, because then they are interchangeable.
Please ccorrect this issue.
(And notify my, because I now changed my frond-end to work with the reversed order)
Thanks.
I am trying to have my users access the API using the input such as type, keywords or participants. Using your API how could I access certain activities using responses in a form?
Im trying to figure out how to use this at all because I can't seem to figure it out
The tasks that your API provides are too huge, I don't know how to access your database otherwise I would have added some simple tasks in there myself. There should be tasks that seem doable to the user like "hey you go touch some grass" or "hey you go take your dog for a walk"
Have not been able to get a good response this week. Sites looks to be down.
Hello,
Is the activities json still being updated regularly ? I've submitted few suggestions to increment it but seems to not be there.
I am keen to help and review all the received suggestions if necessary.
Just give me instructions how to proceed.
If you ever do want to update the API, then here are some new fields to consider to make the search more granular.
duration
: A measure of how long an activity takes. Could be text or integer, but it should be discrete: minutes
, hours
, days
, weeks
.
accessibility
: Redefined to focus on disability/health/age. At the very least, no challenges
, minor challenges
, major challenges
.
resources
or availability
etc.: The former "accessibility" field but now focused on the resources needed to accomplish the task: no specialized resources needed
, some easy-to-find resources needed
, some specialized resources needed
, very specialized equipment required
.
kidfriendly
: A simple boolean flag would do.
It would also be nice to allow for multiple "types" and to revisit the type taxonomy, maybe adding some hierarchy.
API stopped working
Throwing a MongoError
Hello, when I try to test this Get in Postman, I get an error: endpoint not found result for just about every entry I try. Is this API still running?
New to using API's, I just wanted to see if it was still up. Sorry if this post was unnecessary.
Hello, I was wondering what the license for this database is? If I include it in my own project so it can work offline, is that allowed, what's the deal with attribution, etc.
Please let me know, thanks!
that way I could make sure the user doesnt see duplicates
Could you deploy the latest code so that all /v1 and /v2 routes are available?
For example, suggestions or riddles
https://github.com/drewthoennes/Bored-API/blob/master/src/backend/routes/v2/riddles.js
Thanks
Cool API! Not really an issue i think but is it possible to set the participants on more than 1?
Somehting like: ?participants>1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.