Skip to content

Changelog

What’s new in Bayan Library, newest first. The library site and its API are live.

The whole tafsir catalog, live

Every tafsir in turath.io’s catalog and the Qur’an are loaded, and the API that searches them is live at grep.getbayan.app.

The API is live

https://grep.getbayan.app answers the ayah lookup, search, quotes, context and the book list for everyone, with no key, rate-limited per address. The docs describe it as it runs. Agentic search stays off for now.

All 275 tafsirs are loaded

The whole tafsir catalog of turath.io, from Mujahid ibn Jabr (d. 104 AH) to the commentaries of our own century: 992,812 passages, each one cited. With the Qur’an’s ayahs that is 999,048 passages, 995,568 of them searchable by keyword and by meaning.

The Qur’an, from the Tanzil Project

All 6,236 ayahs of Tanzil’s Uthmani text, word for word, one passage to an ayah, credited and linked as Tanzil asks.

The Books page

Books lists the Qur’an and every tafsir the library holds: its passages, how much of the Qur’an it covers, its quote links, whether the ayah lookup answers from it, and a link to read it on turath.

Ayah mapping across the catalog

Each book’s passages are mapped to the ayahs they explain from its own structure: its ayah anchors, its headings, the ayah numbers it prints, or a section that opens by quoting the ayah. 80 tafsirs answer the ayah lookup, 19 of them with a passage on every one of the 6,236 ayahs. Headings that name a whole surah no longer give every ayah of it to each of their passages. See Ayah lookup.

664,725 of the passages’ quotations in ﴿…﴾ are matched to the ayahs they quote, so GET /v1/quotes/:surah/:ayah and the ayah lookup’s quotedBy cover the whole library.

The models

Meaning search embeds with embeddinggemma-2 at 256 dimensions, and Gemma 4 turns an English question into Arabic search terms. Nothing is reranked by default: in the model test a reranker lowered the quality of results. Every model call goes through Cloudflare’s AI Gateway, with its logs off.

Citations, the Qur’an and English questions

Every result now comes with its citation, the Qur’an is in the library, and you can ask in English.

The library site is live

You’re reading it at library.getbayan.app, with the docs, a leaderboard, a blog and this changelog. The API it describes, at grep.getbayan.app, isn’t deployed yet.

Every passage comes with its citation

Each result carries a ready-made Arabic reference with the book, volume and page, and links to that page in turath’s reader and to the printed scan where there is one. When the page numbers may not match the printed edition, the citation says so. See Citations.

The Qur’an is in the library

Any ayah can be returned on its own, in the Uthmani text of the Tanzil Project, credited and linked. Search finds ayahs by keyword and by meaning.

See which passages quote an ayah

When a book is loaded, its ﴿…﴾ quotes are matched to the ayahs they quote: 193,411 of 275,371 in the sample books. The ayah lookup now says how many passages quote each ayah.

Ask in English

A question with no Arabic in it can be turned into Arabic search terms by a model, which only searches and never answers. It stays off until a model is set, and can be turned off for any request.

Tests

All 578 tests, in 33 files, passed when these changes were put together. None of them touch the network.

New

GET /v1/passages/:id/source

A passage together with the other passages on its printed page, in book order, up to 20.

GET /v1/quotes/:surah/:ayah

Every passage that quotes an ayah, paged like the ayah lookup.

filter.quran

Keep the Qur’an in your results (the default), leave it out, or search only the Qur’an. See Filtering.

Fixes from review

A keyword search limited to a surah or an ayah now goes through the keyword index first. On a local test, الله in 2:255 went from about a second to under 80 ms. Long questions are searched by their rarest words.

Cleaner text

Headings appear as the book prints them, a paragraph split by a page turn is joined again, and editors’ indexes and afterwords are left out. Passages over the 1,200-letter limit fell from 329 to 18, each one longer only to keep a quoted ayah whole.

No stale answers

A new version of the library is announced only once its search index is fully written, and the cache is cleared when it is. Rate limits now count an IPv6 caller per network, not per address.

Agentic search ranks everything it finds

With a reranker set, every passage a round finds is ranked against the question. Before, some could be dropped when you asked for more than 25.

The first build

The first version of the API, built and run on 25 sample tafsirs. Nothing was deployed.

Look up an ayah

Get the passages that explain any ayah, from the tafsirs you choose, with a count of how much each book says about it. See Ayah lookup.

Search by keyword and by meaning

Two searches run side by side, an Arabic-aware keyword search and a search by meaning, and their results are merged and reranked. If the reranker fails, you still get the merged results. See Search and Ranking.

Agentic search, off by default

A model writes the searches and decides when it has enough, in up to three rounds. You get passages, never its prose. See Agentic search.

Surrounding context

Get the passages just before and after any passage, up to five each way. See Surrounding context.

Loading the books

Loading the books. turath.io’s files are decoded, cleaned of markup, cut into passages of up to 1,200 letters and mapped to the ayahs they explain from each book’s own structure. Editors’ pages are left out, and footnotes are kept aside.

Daily updates

Once a day the library checks turath’s catalog and reloads only the books that changed.

Built on Agentset

Result merging, reranking and the rules for a search request are ported from Agentset’s MIT-licensed code. Its billing and multi-tenant code isn’t.

A full review

A review of the whole service confirmed 30 issues. The fixes are listed under 28 November.