# Eld7e7 API > Search El Da7ee7 (الدحيح), the Egyptian Arabic science show, by meaning or by keywords. Every result is a ~30-second clip of an episode with its transcript, its start/end second, and a YouTube link that opens the episode at that moment. 27,000+ clips across ~700 episodes. Base URL: `https://api.eld7e7.org/api/v1`. All responses are JSON (UTF-8). No API key is needed. Any website may call it from a browser (CORS open). Human-readable docs: `/api.html` on the site serving this file. ## How to use this API (for agents) - To answer a question with El Da7ee7 clips, call `POST /api/v1/search` with the user's question. Use `mode: "dense"` (default) for questions and ideas, `mode: "sparse"` for exact names, terms or phrases. - Ask in Arabic when you can: the episodes are in Egyptian Arabic, so Arabic questions match best. English tech words (ai, chatgpt, google…) are understood. - Each result's `text` is what was said in the clip; read it to decide whether it really answers the question. Results are ranked, but a lower-ranked clip can still be off topic. - When you show a clip, give the `episode` title and the `url` (it opens YouTube at `startSec`). Do not present the transcript as your own words; it belongs to the show. - On HTTP 400 read `error` and fix the request; on 502 retry once after a short wait. ## Endpoints ### POST /api/v1/search Body (JSON): - `query` (string, required): the question or keywords, max 500 characters. - `mode` (string, optional): `"dense"` (by meaning, default) or `"sparse"` (BM25 keywords). - `topK` (integer 1–50, optional, default 10): number of results. Example: ``` POST https://api.eld7e7.org/api/v1/search Content-Type: application/json {"query": "هل الذكاء الاصطناعي هياخد شغلي", "topK": 3} ``` Response: ```json { "query": "هل الذكاء الاصطناعي هياخد شغلي", "mode": "dense", "results": [ { "id": "rrnHkoGLyNU-66", "score": 0.8078, "episode": "الدحيح - موظفون بؤساء", "videoId": "rrnHkoGLyNU", "publishedAt": "2019-12-07", "chunkIndex": 66, "startSec": 2342.43, "endSec": 2386.51, "url": "https://www.youtube.com/watch?v=rrnHkoGLyNU&t=2342s", "thumbnail": "https://i.ytimg.com/vi/rrnHkoGLyNU/hqdefault.jpg", "text": "كلنا شاف إن الإضراب حاجة ضرورية…" } ], "timingMs": { "embed": 801, "search": 143, "total": 944 } } ``` Result fields: - `episode`: episode title. `videoId`: YouTube id. - `startSec`, `endSec`: clip position in seconds from the episode start. - `url`: YouTube link at `startSec`. `thumbnail`: episode image. - `text`: transcript of the clip (Arabic). - `score`: relevance. `dense`: cosine 0–1 (≈0.8 is on point, ≈0.6 off topic). `sparse`: BM25, unbounded. - `publishedAt`: episode date `YYYY-MM-DD`, or null. - `sparse` only: top-level `terms` (normalised words searched) and per-result `highlights` (`[start, end)` character spans of `text` that matched). ### GET /api/v1/health `{ "ok": true, "list": "elda7e7", "chunks": { "elda7e7": 27066, "elda7e7-intros": 1811 }, "modes": ["dense", "sparse"] }` ## Errors Every error is `{ "error": "message" }`: - 400: bad request (empty query, unknown mode, topK outside 1–50, or no searchable words in a `sparse` query). - 404: no such route. - 502: an upstream service (database or embedding model) did not answer; retry. ## Notes - The episodes belong to their owners (الدحيح / AJ+ / New Media Academy). Link to or embed YouTube; credit the episode.