quran / quran.com-api

Quran.com content APIs
https://api-docs.quran.foundation/docs/category/content-apis
MIT License
922 stars 192 forks source link

Search API is not working? #419

Closed mufidu closed 3 years ago

mufidu commented 3 years ago

I tried the search endpoint and it seems like I can't use it because it has several problems.

First, when I tried

https://api.quran.com/api/v3/search?q=air&size=20&page=0&language=id

It will return some verses containing "air" in English translation, not in Bahasa Indonesia as expected. And the total results are just 5 which is I'm sure there are more.

But if I try for

https://api.quran.com/api/v3/search?q=water&size=20&page=0&language=en

like in #309, it just works as expected. So the language params seem ignored. Using the ISO code and language id has the same results.

But tried this one,

https://api.quran.com/api/v3/search?q=sad&size=20&page=0&language=en

And I got mixed translations from Slovak, Bosnia, and other languages. I just can get the correct results using the "water" query.

Lastly this,

https://api.quran.com/api/v3/search?q=sedih&size=20&page=0&language=id

will give an empty result. I looked up the Quran and there are some verses containing "sedih".

Thank you, hope it helps. Other endpoints work fine, great job team!

mujahid515 commented 3 years ago

https://api.quran.com/api/v4/search?q=musa https://api.quran.com/api/v3/search?q=musa

V3 and V4 of this API returns the following:

{ "status": 500, "error": "Internal Server Error" }

It was working for the past week and then suddenly stopped working yesterday. Has there been any changes on your end?

naveed-ahmad commented 3 years ago

@mufidu Search was buggy and broken, finally got some time and pushed some fixes this week.

mufidu commented 3 years ago

Great, thanks!