16 ms·
Quran API
- orliesaurus 5y agoIs it free?
- asim 5y agoIt is free yes
- killingtime74 5y agoI’m sorry why wouldn’t I just download the whole text? It’s a document?
- jhgb 5y agoDidn't you hear? APIs are the new religion. ;)
- pletnes 5y agoIs it freely available in a structured, machine readable «here is verse XX» format? I could ask the same for other holy texts, I guess.
- jhgb 5y agoI bet pretty much all of them will be. People have all sorts of weird hobbies, so for every holy text three thousand years old, there will be at least six machine-readable versions.
- asim 5y agoPeople may want to not only read but build apps, websites, include the text, translate, etc. So it's more about programmatic access to the text. If you see Quran.com this is exactly what it does.
- cphoover 5y agowhy can't you have programmatic access to local data though? Store the data in a sqlite database if you care to. there are all sorts of different clients that interact with local or embedded data
- marginalia_nu 5y agoI'm not a muslim, but I do build a lot of tools for myself (and to a lesser degree for the public), and open APIs like these are incredibly convenient. Saves me from having to do a lot of data processing.
- jhgb 5y agoI believe the gist of the question was "why provide remote access to data that is just several megabytes in size?". You could easily pack both the code AND all the data into a single package. Equally convenient AND works offline at the same time.
- cphoover 5y agogood explanation summarizing my critique as well
- fredros 5y agoChecking chapter 9, verse 30 to check if god still wants Christians and Jews to be annihilated.
- dang 5y agoReligious flamewar will get you banned here. No more of this, please. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- fredros 5y agoI often see anti-Christian rants here. I suggest you become more supportive of free speech. By the way I’m just paraphrasing a problematic verse. Go and check yourself. Is it ok to link to hateful content? Your rules though, noted.
- dang 5y agoWe crack down on religious flamewar regardless of which religion is being flamed or doing the flaming. This is one of the easier aspects of moderation, actually, because such flamewars are easy to identify and relatively easy to avoid. https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20religious%20flamewar&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... It's common for people to believe that the community and/or the mods are biased against their side, but I can tell you for sure that anti-Christian rants aren't any more ok on HN than anti-any-other-religion rants. If you think you're seeing otherwise, the explanation is almost certainly a combination of: (1) People tend to notice what they dislike and put a stronger emphasis on it - https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20dislike%20notice&sort=byDate&type=story&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que.... This leads to false feelings of generality - https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=%22false%20feelings%20of%20generality%22&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que.... Usually the feeling is "the community (or mods) are biased against my side". Literally all sides end up feeling this. I guarantee you that people on the other side feel just as aggrieved about it. (2) We don't see everything that gets posted and it takes time to moderate what we do see - https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sort=byDate&type=comment&query=likeliest%20by:dang https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor.... Now I need to ask you again to stop posting religious flamewar comments because you just did it again. If you keep that up, we are going to have to ban you.
- fjfaase 5y agoOr just downloaded it as a PDF, from for example wikimedia: https://upload.wikimedia.org/wikipedia/commons/b/b2/The_Holy_Quran.pdf https://upload.wikimedia.org/wikipedia/commons/b/b2/The_Holy...
- midev 5y agoOr even buy a copy of the book! We can do anything if we throw out all our requirements! Can you explain how I'd make calls from a frontend to a PDF? I'd like to include various search terms, and then get back well-structured data. Is this something PDF's recently started supporting?
- b0rsuk 5y agoYou might be interested in: WILL A CAT WALK ON THE QURAN? 2ND EXPERIMENT (100% ARABIC QURANS!) https://www.youtube.com/watch?v=mBwvPJa0HPE https://www.youtube.com/watch?v=mBwvPJa0HPE
- dang 5y agoReligious flamewar will get you banned here. No more of this, please. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- suriyaG 5y agoThis is cool, dunno why the hate though. There was I think a similar one for Bible as well. https://news.ycombinator.com/item?id=23737601 https://news.ycombinator.com/item?id=23737601
- friendly_chap 5y agoYeah, I am somewhat appaled by that too, why could we not have APIs of religious texts (edit: unless it is against the particular religion in question, thus offending believers)? Disclaimer: I am one of the contributors of the site.
- mrd3v0 5y ago>unless it is against the particular religion in question, thus offending believers Based on how many religions and sects of these religions out there, it is entirely unfeasible to have that as a criteria for anything. Human knowledge/text no matter what it contains could have APIs just fine.
- bastardoperator 5y agoI'm not religious, but I've always assumed belief in one religion means you believe other religions are false maybe even fake. To say you are a practicing _____ (insert religion), you're in essence saying my religion is right and others are wrong maybe even infidels or heathens. I can see how people who believe in these things could take offence if they're of a different belief.
- r00fus 5y agoIt all sounds so childish to me as a current atheist. Like, who's sports team are you a fan? If not mine, then you're against me. In fact, an API that allows access to a religious text should be useful for everyone - even those detractors of said religion. Next up, we need a legal code API and versioning.
- cat199 5y ago
- thendrill 5y agoWhat a great initiative! All important human know lage should have free publicly available apis!
- asim 5y agoIt's a shame this was flagged. It's unclear why.
- b0rsuk 5y agoLikely because Muslims are very prickly.
- asim 5y agoCould you elaborate?
- b0rsuk 5y agoDeath threats when you draw a caricature of Muhammad. Death threats for many other Muhammad-related things. Even South Park is afraid. https://www.google.com/search?q="death+threats"+muhammad https://www.google.com/search?q="death+threats"+muhammad
- vmception 5y agoFor context, there are a lot of people that also only want the Quran to be consumed in a certain way, such as original language variant, possibly even publisher, binding format. So English via API doesn't satisfy that.
- dang 5y agoWe've banned this account for religious flamewar. Not cool, and not what this site is for. https://news.ycombinator.com/item?id=28595832 https://news.ycombinator.com/item?id=28595832 If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html.
- pwnapple 5y agoThis seems very similar to the work over at Quran.com and their API: https://quran.api-docs.io/v4/getting-started/introduction https://quran.api-docs.io/v4/getting-started/introduction If you did use their resources, please cite/reference them :)
- asim 5y agoYes, we are building on that API. It's referenced here https://github.com/micro/services/tree/master/quran https://github.com/micro/services/tree/master/quran. Unfortunately we're having some issues with our readme processing and haven't yet fixed. All credit will be given where it is due.
- hsn915 5y agoYou can download an xml or sql file from here https://tanzil.net/download/ https://tanzil.net/download/ They also provide metadata for download https://tanzil.net/docs/Quran_Metadata https://tanzil.net/docs/Quran_Metadata If you instead send an http request to antoher server, you are just introducing a pointless dependency in your system. It will make your system generally slower because it will take more time to get answers. There's absolutely no benefit.
- friendly_chap 5y agoI can think of a few: - type safe clients provided by M3o - reducing app/webapp/binary space by relying on APIs to get a subset of the content you need - a web interface to query the data There are probably a few more, YMMV
- hsn915 5y agoHow is it type safe? Type safety is worse for http calls because you literlly have no idea at compile time what the data will be. Where as, when all the data is in your repository, you can verify the data matches what you expect. Reudcing space? Really? The data is actually very small. Your npm modules take a lot more space. If anything is really cheap and not worth worrying about, it's disk space.
- schoen 5y agoAbove I suggested that reducing space could sometimes be relevant -- I think interactive maps are a very familiar example, although offline maps are great for privacy and for being able to use them in the wilderness. Even though I don't think that the Quran API will benefit many applications, you could probably envision some, like very tiny embedded systems that don't have even megabytes of spare local storage (but do have some kind of user interface).
- friendly_chap 5y agoHave a look at the Go clients for example. There are proper type safe clients for each API generated form our protobuf definitions. > Type safety is worse for http calls because you literlly have no idea at compile time what the data will be. We promise we will return data as per API spec ;) > The data is actually very small For this particular example, I guess you are right. Our vision is that all APIs will have uniform clients, docs etc, so in aggregate it will provide a very convenient workflow. So instead of downloading a.json and b.xml and c.yaml (if possible at all due to size) and defining data structures yourself, just import our library and you are good to go. But as I said, YMMV. If it's not your cup of tea, I understand that too.
- jjice 5y agoSeem like query parameters are going out of style. Doesn't really matter if we use them or a small JSON payload instead, same end result, but it is pretty interesting. This API opts for a body like: {"chapter":1} instead of ?chapter=1 in the URL. Just something I've noticed in a lot of APIs recently.
- jagged-chisel 5y agoPOSTing a body, when a GET param is more RESTy, is unfortunate. But I am curious if some amount of developer convenience is leading to REST-like APIs (I like the way you put it) going out of style. A curiosity to be sure, and by no means a critical problem. EDIT: added some commas to help with parsing since I have my phrasing all turned about.
- SahAssar 5y agoQuery-params are not "un-RESTy", and posting when requesting static data is worse primarily for caching and semantics. For this usecase a ?chapter=1 query string would have been better and not at all less "RESTy".
- jagged-chisel 5y agoI think you're read my message in reverse. I've said that POSTing is unRESTful when a GET is preferred.
- SahAssar 5y agoAh, yeah, seems I misunderstood!
- 1_player 5y agoIt's not even a case of being RESTy or not. A GET request with a `?chapter=1` argument is more correct than POST because then it's cacheable by browsers, proxies or middleware clients, and thus respects the spirit of the HTTP protocol. Only if the Qur'an is immutable, that is.
- cphoover 5y agowhat is the point of an API for static data like this? storage is cheap... why not just download the entire Quran, Bible, Torah, whatever to your local hard drive... why incur network latency for this task?
- rocketpastsix 5y agomaybe they hope someone will do a verse (is it a verse in Islam? I'm not sure) type app that will text that data to subscribers or something.
- yebyen 5y agoI think you mean Surah/Ayah (those are the expressions for what in the Quran is akin to Chapter/Verse)
- jagged-chisel 5y agoLinguistic curiosity: why would these expressions not be translated into English?
- whitefirered 5y agoIt might be easier to use an api instead of having to go through it yourself.
- bastawhiz 5y ago
- 2Gkashmiri 5y agocool
- deleted 5y ago[deleted]
- itisit 5y agoVerse'); DROP TABLE Quran; CREATE TABLE Progress;--
- throwawayswede 5y agoMight as well `drop db religion` :)
- 29athrowaway 5y agohttps://www.genealogy.math.ndsu.nodak.edu/extrema.php https://www.genealogy.math.ndsu.nodak.edu/extrema.php Go to the one with most descendants, then keep visiting the descendant with most descendants. See how the flags start changing. From Islamic scholars to Italian to other European countries to American. Did we learn anything today? What does this mean? It means the only reason you have a computer today is because the Islamic civilization passed the torch of knowledge to the West. Then they got invaded by Mongols and we kept the flame alive.
- throwawayswede 5y ago> It means the only reason you have a computer today is because the Islamic civilization passed the torch of knowledge to the West. Overstatement of the day.
- yessirwhatever 5y agoIf you understand Arabic and are interested in the exploration of the history of Muhammad, Islam, and the Arabic language, I'd recommend checking out https://www.youtube.com/c/KhaledBalkin https://www.youtube.com/c/KhaledBalkin
- whitefirered 5y agoI am waiting for someone to make a spoof of Ask Jeeves called Ask Allah.
- croumet 5y agoVerse 9:30 The Jews say, "Ezra is the son of Allah "; and the Christians say, "The Messiah is the son of Allah." That is their statement from their mouths; they imitate the saying of those who disbelieved [before them]. May Allah destroy them; how are they deluded? Come on dang, ban me for HATE FACTS.
- aliabd 5y agoThis is awesome and will enable a whole suite of apps to be build on top of it. Great work
- midoreigh 5y agoThis is really useful. Please do an API for Hadiths too.
- shaunxcode 5y agoThis is brilliant.
- oa335 5y agoRevelation place and revelation order should be tagged with the source (I.e. where that information is conning from), as it’s not 100% known in either Muslim canonical or western academic histories, whereas this dataset makes it seems like it is a known agreed upon fact.
- kamranahmedse 5y agoWhat about the authenticity of the data?
- ibraheemdev 5y agoIt is built on top of Quran.com's API, which is a very reliable source.
- roschdal 5y agoWhat is the API call for the Four wives request?
- roschdal 5y agoJihad as a service.
- dang 5y agoI banned this account for repeatedly breaking the site guidelines, but changed my mind and unbanned you because you've been here for 12 years. If you don't want to be banned, please review the site guidelines at https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and stick to the rules. You've been breaking them badly. The idea here is: if you have a substantive point, please make it thoughtfully; if not, please don't comment until you do. Flamewar is out, and religious flamewar is absurdly out, so no more of that please.
- schoen 5y agoI took the view in this thread that downloading a file with the whole text would have a lot of big advantages compared to an API. A lot of other commenters have expressed this idea too. But I want to highlight something from a comment of mine further down: while looking for examples of downloadable sacred texts, I found this page https://hackathon.bible/data/ https://hackathon.bible/data/ which has -- alongside downloads -- a whole bunch of actively-maintained APIs for Christian Bible verse access, some of them run by pretty prominent organizations. So, all of our intuitions about the merits of downloading sacred texts to bundle with apps are, apparently, not entirely shared by other developers. :-)
- adav 5y agoA similar thing has also been done with other religious texts (e.g. https://github.com/Sefaria/Sefaria-Project/wiki https://github.com/Sefaria/Sefaria-Project/wiki) It would be quite interesting if all the world religions’ and philosophies’ texts could be hosted with a common format and available with an API for linking and finding parallels etc. Maybe then run it all though GPT-3 and generate a new ideology – perhaps a bit scary as to what will come out!
- hasmanean 5y agoThe API is the last part of the puzzle you should solve. The data storage format and queries are the real problem.
- hasmanean 5y agoI actually knew a man who spent half his life trying to solve this problem from the 1980s onwards. One thing which ancient texts require that modern ones don’t is this: there are a lot of commentaries written about these texts. They’re crucial for understanding the original text. In fact in the Arab world commentaries on Greek and other books were sometimes as valuable as the originals. Commentaries on commentaries were common. In the west we treat the original as sacred and everything else as secondary. A real value for an API on a sacred text is to capture all the commentary around it, and let people upload the present say contexts in which they understand it. That would be one way to “understand” a text. That would be a crowd-sourced encyclopedia of hermeneutics. Call it Wikineutics.
- darkhorn 5y agoWhich version of Quran is this? There are 30 different Qurans and if I remenber 6 of them are in wide use. For example Quran in Egypt is different than in the Quran in Turkey.
- ibraheemdev 5y agoThere is only one Quran. Perhaps you are referring to differences in line or page numbering?
- zodiakzz 5y agoThat's a myth. There are many different versions: https://answering-islam.org/Green/seven.htm https://answering-islam.org/Green/seven.htm
- isr 5y agoNo, it isn't. There is 1 version. This myth keeps getting proposed by, quite frankly, anti-Muslim bigots of various types and persuasions, across the centuries. It has been repeatedly debunked. And you will get the same answer from any of the multitude of non-Muslim professors in Islamic Studies faculties from universities throughout the non-Muslim world. And in other news, no - the world is NOT flat. That myth was also debunked, long ago. Mods - this is a blatent attempt to drag what is an interesting thread into the realm of Islamophobia and the resultant mud slinging that comes with it. Isn't there anything you can do to nip this sort of nonsense in the bud?
- omarfarooq 5y agoThis has been debunked ad infinitum, and Christians have never provided a rebuttal beyond their first shout into the wind (ie. that answering-islam.org link you provided). https://yaqeeninstitute.org/read/paper/the-origins-of-the-variant-readings-of-the-quran https://yaqeeninstitute.org/read/paper/the-origins-of-the-va...
- keithnz 5y agoI think I need to start an atheist API that returns 404 :)
- 0xdeadb00f 5y ago404 god not found
- yawaramin 5y agoCool effort, but why are they all POST requests? These should all be GET requests with either path or query parameters. They're not creating any resources on the server side, only fetching existing resources. HTTP 101! :-)
- akacia 5y agoStop spreading religious BS
- pknerd 5y agoAh remind me days when I made an MSN messenger Quran bot in 2005 and then Twitter bot in 2009. Both used Quran data in XML format which I later converted into Sql. Good attempt!