{"name":"Pejvak API","version":"v1","license":{"name":"CC BY-SA 4.0","url":"https://creativecommons.org/licenses/by-sa/4.0/"},"usage":"Free for any use, including AI training; credit Pejvak with a link and share adapted data alike.","access":{"withoutKey":"Personal use: 120 requests a minute and 2000 a day per address, at most 20 results a page and 25 pages deep. For everything, use the downloads.","withKey":"Free key from your profile (Authorization: Bearer ava_…): your own limits per minute and per day, the same 20 results a page, 1000 pages deep.","getAKey":"https://pejvak.it/en/profile#api"},"downloads":{"json":"https://pejvak.it/api/v1/export.json","csv":"https://pejvak.it/api/v1/export.csv","text":"https://pejvak.it/llms-full.txt","about":"https://pejvak.it/en/data"},"endpoints":{"GET /api/v1/phrases":"Search phrases. Query: q, tag (repeatable, taxonomy/slug), poet (slug), sort (relevance|new|old|az|liked|verses|gentle|harsh), page, pageSize (≤20, with a key or without).","GET /api/v1/works":"Books of a poet. Query: poet (a name). poet is null when no such poet exists yet.","GET /api/v1/poems/find":"Poems the archive holds, found by words like «حافظ غزل ۴۳۵». Query: q. Returns poet, work, locator and url of each poem.","GET /api/v1/phrases/check":"Is a phrase already in the archive? Query: q. Same phrase (any spacing), same letters in another order, close phrases.","GET /api/v1/suggest":"Suggestions for a search box. Query: q (2 to 80 characters), lang (fa|en). A few phrases, poets and tags that match, each with a name and a link.","GET /api/v1/today":"The verse of the day: lines, poet (both languages), when it was sent out and its page in both languages.","GET /api/v1/calendar/today":"Today in Tehran: the Persian and Gregorian day, the confirmed occasion in force, and the poets born or who died on this day (only poets whose day is known).","GET /api/v1/offline-pack":"The pages of an offline pack: a poet or tag page and its best-attested phrase pages. Query: kind (poet|tag), slug, taxonomy (tag only), locale (fa|en).","GET /api/v1/verses":"Published verses by id. Query: ids (comma-separated, ≤60). Used by the saved-verses page.","GET /api/v1/phrases/{slug}":"One phrase with all published occurrences, verses, tags and glosses.","GET /api/v1/taxonomies":"All taxonomies and their tags.","GET /api/v1/poets":"Poets with phrase counts.","GET /api/v1/poets/check":"Is a poet already in the archive? Query: q. The poet with this name in any spelling or other name, and poets whose name contains it.","GET /api/v1/stats":"The numbers of the public statistics page: totals, growth by month, breakdowns by poet, work, style, mood, addressee. No individual is named; groups under 5 are null.","GET /api/v1/export.json":"The whole published archive in one document (refreshed daily).","GET /api/v1/export.csv":"The whole archive, one row per verse.","GET /api/v1/sponsors.json":"The own sponsors shown to readers in Iran (a banner, its link, dates). The static copy is built from it.","GET /api/v1/mirror/feed":"The signed feed a live mirror follows: the head with nothing, ?table= for a table's index, ?table=&v=&keys= or &page= for rows. Off (404) until the site has a feed key.","GET /api/v1/mirror/download/{token}":"The latest signed zip of the read-only copy, for an approved host only. The token is in the host's e-mail; a wrong or stopped one answers 404.","POST /api/v1/phrases/{slug}/variants":"Make a phrase a variant of this one. Body: { variant: slug }. Auth: Bearer key of an admin.","DELETE /api/v1/phrases/{slug}/variants/{variant}":"Make a variant a separate entry again. Auth: Bearer key of an admin.","POST /api/v1/phrases/{slug}/make-main":"Make this variant the main entry of its group. Auth: Bearer key of an admin.","PUT /api/v1/verses/{occurrenceId}/vote":"A partner app's vote for one of its users, server to server. Body: { voter (16 to 128 of A-Z a-z 0-9 _ -), value: 1 | -1 | 0 }. Auth: Bearer pvk_ key with the vote permission. One vote per key, voter and verse; answers likes, dislikes and value.","POST /api/v1/submissions":"Submit a contribution. Auth: Bearer API key (make one on your profile) or a signed-in session. Body: SubmissionPayload.","POST /api/v1/channels/telegram":"Telegram bot webhook (secret-token protected).","POST /api/v1/channels/x":"Poll X for the configured hashtag (CRON_SECRET protected).","POST /api/v1/channels/daily":"Post the verse of the day to Telegram and X; ?dry=1 to preview (CRON_SECRET protected).","POST /api/v1/channels/quiz":"Post the quiz poll (whose verse is this?) to Telegram and Bale when it is switched on; ?now=1 to post regardless (CRON_SECRET protected)."}}