Ganjoor Poetry
v0.1.0Read-only Ganjoor (ganjoor.net) Persian poetry: poems with meanings, search, meters, audio.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gj_meters Poetic meters
List poetic meters (وزن) with couplet counts, biggest first; filter by name. Feed a name or id to gj_similar.
| Parameter | Type | Description |
|---|---|---|
query | string | null | Part of a meter name, e.g. 'رمل' or 'هزج مسدس'. |
gj_similar Poems with same meter and rhyme
Find poems that share a meter and rhyme, with their first couplet; 10 per page.
| Parameter | Type | Description |
|---|---|---|
meter * | Meter id or name (part of it is enough if unique), from gj_meters. | |
cat_id | integer | null | Only this book/category. |
page | integer | Page number. |
poet_id | integer | null | Only this poet. |
rhyme_letters | string | null | Rhyme letters, e.g. 'ارا' (poem.rhyme_letters). |
gj_recitations Recitations
List poem recitations (خوانش) with reciter, mp3 link, size and votes; give exactly one of poem_id, cat_id, latest.
| Parameter | Type | Description |
|---|---|---|
cat_id | integer | null | Top recitation of each poem in this book/category. |
latest | boolean | Newest published recitations site-wide. |
limit | integer | Max recitations for cat_id and latest. |
poem_id | integer | null | Recitations of this poem, best first. |
with_timing | boolean | With poem_id: add start milliseconds of each verse of the best recitation. |
gj_literary Literary devices
Show rhetorical devices (آرایه: tashbih, esteare...) and concepts tagged in poems; coverage is partial, mostly Hafez.
| Parameter | Type | Description |
|---|---|---|
cat_id | integer | null | Limit tags/stats to this book/category. |
poem_id | integer | null | Rhetorical devices tagged in this poem, per couplet. |
poet_id | integer | null | Limit tags/stats to this poet. |
tag | string | null | Device key or name (tags view), or concept search text. |
view | string | null | Lookup when no poem_id: devices (the list with definitions), concepts (search `tag`), tags (couplets tagged with device `tag`), stats (tag counts). Default devices. |
gj_words Word frequency
Count word use in a poet's or book's poems: the most frequent words, or how often one word appears.
| Parameter | Type | Description |
|---|---|---|
cat_id | integer | null | Book/category id (a poet's whole divan: its root cat_id). |
limit | integer | Top words to list. |
poet_id | integer | null | Poet id (all their books together). |
word | string | null | Count this exact word instead of listing top words. |
gj_people People and characters
Look up people and characters of epic poems (Shahnameh...): search, relations, family tree, or a book's cast.
| Parameter | Type | Description |
|---|---|---|
cat_id | integer | null | Instead: the main characters and links of a book (e.g. 33). |
id | integer | null | Person id from a search. |
query | string | null | Search characters by name or alias (e.g. 'رستم'). |
view | string | For id: info, relations (kin and ties with evidence), familytree. |
gj_places Places in poems
Find geotagged places (locations with latitude and longitude) named in poems, a book, or by name.
| Parameter | Type | Description |
|---|---|---|
cat_id | integer | null | Places named across a book/category, with a few poems each. |
poem_id | integer | null | Places named in this poem, with the couplet. |
query | string | null | Search the place list by name (e.g. 'شیراز'). |
gj_museum Museum manuscripts
Browse Ganjoor museum manuscripts and scans (گنجینه): search, one manuscript's details, or one page image.
| Parameter | Type | Description |
|---|---|---|
item | string | null | With slug: one page slug, e.g. 'p0001'. |
page | integer | Page number. |
query | string | null | Search manuscripts by title or poet; empty lists the newest. |
slug | string | null | Manuscript slug from a search, e.g. 'nowras'. |
gj_search Search poems by words
Full-text search of poems by the words they contain, with the matching couplet. All words must appear in the poem. Use gj_semantic_search to search by meaning instead.
| Parameter | Type | Description |
|---|---|---|
query * | string | Persian words as written in the poem, e.g. 'دل من'. |
cat_id | integer | null | Only this book or section (cat_id). |
page | integer | Page number, 10 results per page. |
poet_id | integer | null | Only this poet (id from gj_poets). |
gj_semantic_search Search poems by meaning
Find poems by meaning or theme (embedding search), with score, summary and first couplets. Falls back to full-text search when the semantic index is down.
| Parameter | Type | Description |
|---|---|---|
query * | string | What the poem is about, in Persian or English. |
top_k | integer | How many poems to return. |
gj_find_verse Find the poem of a quoted line
Locate which poem and couplet a quoted line comes from, with the couplet's meaning. Spelling differences (ye/kaf, ZWNJ, diacritics, punctuation) are ignored.
| Parameter | Type | Description |
|---|---|---|
text * | string | A line or couplet quoted from memory, in Persian. |
gj_poem Read a poem
Read a poem: text by couplet with meanings, summary, meter, rhyme, source and previous/next poem. Meanings starting with «هوش مصنوعی:» are AI-written. Give id or url.
| Parameter | Type | Description |
|---|---|---|
id | integer | null | Poem id. |
max_couplets | integer | null | Couplets to return (80 default). |
meanings | boolean | Include the plain-Persian meaning of each couplet. |
url | string | null | Or the ganjoor.net path, e.g. /hafez/ghazal/sh170. |
gj_poem_extras Poem recitations, replies and comments
Recitations with mp3 links, manuscript images, songs, related poems, quoting poems and reader comments. Each part is trimmed (about 10 items).
| Parameter | Type | Description |
|---|---|---|
id * | integer | Poem id (`id` from search or book results). |
parts | array | null | Which extras: recitations, images, songs, related, quoted, comments. Default recitations+related. |
gj_faal Hafez faal or random poem
Draw a Hafez faal (a random ghazal of Hafez) or, with random=True, a random poem, read with meanings. Same output as gj_poem.
| Parameter | Type | Description |
|---|---|---|
poet_id | integer | null | With random: only this poet (2 is Hafez). |
random | boolean | True for a random poem (any poet) instead of a Hafez faal. |
gj_poets List poets
List poets with ids, nicknames, life years (Hijri) and birthplace, filtered by name or century. Without a query only the first 50 are shown.
| Parameter | Type | Description |
|---|---|---|
era | string | null | Century name like 'هشتم' (Hijri century, e.g. 'قرن هشتم'). |
query | string | null | Part of the poet's name or nickname, e.g. 'حافظ'. |
gj_poet Poet biography and books
A poet's biography (shortened) and the top-level books to open with gj_book. Give id or url.
| Parameter | Type | Description |
|---|---|---|
id | integer | null | Poet id. |
url | string | null | Or the poet path, e.g. /hafez. |
gj_book Browse a book
Sub-books and the poems of one book or section, each with its first couplet, paged by 30. Open a poem with gj_poem.
| Parameter | Type | Description |
|---|---|---|
cat_id * | integer | Book or section id (cat_id from gj_poet or a poem's book). |
page | integer | Page of poems, 30 per page. |
gj_tajik Tajik Cyrillic poems
Search or read poems in Tajik Cyrillic transliteration (titles Cyrillic, poet names Persian). Give query to search, or poem_id to read one poem.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number, 10 results per page. |
poem_id | integer | null | Or a poem id, to read it in Cyrillic. |
query | string | null | Search words in Tajik Cyrillic, e.g. 'ошиқ'. |