{"id":28241278,"url":"https://github.com/elsayed85/show_feb_box_api","last_synced_at":"2025-06-14T19:03:55.173Z","repository":{"id":298619239,"uuid":"961050845","full_name":"elsayed85/show_feb_box_api","owner":"elsayed85","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-06T17:39:38.000Z","size":42,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T02:47:09.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://febox.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsayed85.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-05T16:41:15.000Z","updated_at":"2025-06-01T06:15:40.000Z","dependencies_parsed_at":"2025-06-12T02:47:13.876Z","dependency_job_id":"c8f7face-fcee-4aa6-b03c-fdf4a905b6f0","html_url":"https://github.com/elsayed85/show_feb_box_api","commit_stats":null,"previous_names":["elsayed85/show_feb_box_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elsayed85/show_feb_box_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fshow_feb_box_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fshow_feb_box_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fshow_feb_box_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fshow_feb_box_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsayed85","download_url":"https://codeload.github.com/elsayed85/show_feb_box_api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fshow_feb_box_api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259868242,"owners_count":22924230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-19T04:13:30.542Z","updated_at":"2025-06-14T19:03:55.162Z","avatar_url":"https://github.com/elsayed85.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Showbox \u0026 Febbox API Integration 📺 🎥\n\n## 🚀 Overview\n\nThis repository provides an integration between two APIs: **Showbox** and **Febbox**. It allows developers to search for movies and TV shows, retrieve detailed information, and fetch files and download links associated with them via the **Febbox** platform.\n\n---\n\n## 🔧 Technologies Used\n\n- **Node.js** (JavaScript runtime)\n- **CryptoJS** (for encryption and decryption)\n- **node-fetch** (for making HTTP requests)\n- **JSDOM** (for parsing HTML responses)\n- **nanoid** (for generating unique IDs)\n\n---\n\n## 📥 Installation\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/elsayed85/show_feb_box_api showbox\ncd showbox\n\ncp .env.example .env\n```\n\n### 2. Install Dependencies\n\nRun the following command to install the required dependencies:\n\n```bash\nnpm install\n```\n\n---\n\n## 🛠️ API Overview\n\n### **ShowboxAPI** 🎬\n\nThe **ShowboxAPI** class allows interaction with the **Showbox** platform to search for movies and TV shows, retrieve details, and fetch FebBox IDs associated with the content.\n\n#### 🔑 Methods\n\n- **`search(title, type, page, pagelimit)`**: Search for movies or TV shows by title.\n- **`getMovieDetails(movieId)`**: Get detailed information for a movie by its ID.\n- **`getShowDetails(showId)`**: Get detailed information for a TV show by its ID.\n- **`getFebBoxId(id, type)`**: Retrieve the Febbox ID associated with a given movie or show.\n\n#### 🛠️ Configuration\n\nEnsure to configure the following constants in the `ShowboxAPI` class:\n\n```js\n// Set these constants\nconst CONFIG = {\n    BASE_URL: 'https://mbpapi.shegu.net/api/api_client/index/', \n    APP_KEY: 'moviebox',\n    APP_ID: 'com.tdo.showbox',\n    IV: 'wEiphTn!',\n    KEY: '123d6cedf626dy54233aa1w6',\n};\n```\n\n---\n\n### **FebboxAPI** 📂\n\nThe **FebboxAPI** class interacts with the **Febbox** platform to retrieve file lists and download links associated with Febbox share IDs.\n\n#### 🔑 Methods\n\n- **`getFileList(shareKey, parentId, isHtml)`**: Get a list of files for a specific share.\n- **`getLinks(shareKey, fid)`**: Retrieve download links for a specific file.\n\n#### 🛠️ Configuration\n\nEnsure to set the **Febbox UI Cookie** for authentication:\n\n```js\nFEBBOX_UI_COOKIE='your_cookie_here'\n```\n\n## How to Get Your Febbox UI Token\n\nBring your own Febbox account to get the best streaming experience, including 4K quality, Dolby Atmos, and the fastest load times!\n\nTo get your **UI token**:\n\n1. Visit [Febbox.com](https://www.febbox.com) and log in with Google (use a fresh account).\n2. Open **DevTools** in your browser or inspect the page.\n3. Go to the **Application** tab → **Cookies**.\n4. Look for the cookie named **\"ui\"**.\n5. Copy the **\"ui\"** cookie value.\n6. Close the tab, but **do NOT log out** to keep your token valid.\n\n**Important:**  \n- **Do not share** your UI token with others as it is tied to your account. Treat it as a sensitive credential.\n\nFor more details on how to retrieve it, you can watch this guide:  \n[Febbox UI Token Guide](https://vimeo.com/1059834885/c3ab398d42)\n\n\n---\n\n## ⚡ Example Usage\n\nHere’s a full example of how to use both APIs in `main.js`:\n\n```js\nimport ShowboxAPI from './ShowboxAPI.js';\nimport FebboxAPI from './FebboxAPI.js';\n\n(async () =\u003e {\n    const api = new ShowboxAPI();\n    const febboxApi = new FebboxAPI();\n\n    // Search for a movie\n    const movieTitle = 'ratatouille';\n    const results = await api.search(movieTitle, 'movie');\n    const movie = results[0];\n    console.log('🎬 Movie:', movie);\n\n    // Fetch FebBox ID and file links for the movie\n    let febBoxId = await api.getFebBoxId(movie.id, movie.box_type);\n    if (febBoxId) {\n        console.log('🔗 FebBox ID:', febBoxId);\n        const files = await febboxApi.getFileList(febBoxId);\n        console.log('📂 File List:', files);\n        const file = files[1];\n        const links = await febboxApi.getLinks(febBoxId, file.fid);\n        console.log('🌐 Links:', links);\n    }\n\n    // Search for a TV show\n    const showTitle = 'breaking bad';\n    const showResults = await api.search(showTitle, 'tv');\n    const show = showResults[0];\n    console.log('📺 Show:', show);\n\n    // Fetch show details and FebBox ID\n    const showId = show.id;\n    const showDetails = await api.getShowDetails(showId);\n    console.log('📜 Show Details:', showDetails);\n\n    febBoxId = await api.getFebBoxId(show.id, show.box_type);\n    if (febBoxId) {\n        const files = await febboxApi.getFileList(febBoxId);\n        console.log('📂 File List:', files);\n        const file = files[4];\n        if (file.is_dir) {\n            const seasonFiles = await febboxApi.getFileList(febBoxId, file.fid);\n            console.log('📂 Season Files:', seasonFiles);\n            const seasonFile = seasonFiles[0];\n            const links = await febboxApi.getLinks(febBoxId, seasonFile.fid);\n            console.log('🌐 Season Links:', links);\n        } else {\n            const links = await febboxApi.getLinks(febBoxId, file.fid);\n            console.log('🌐 Links:', links);\n        }\n    }\n})();\n```\n\n---\n\n## 💡 Additional Features \u0026 Options\n\n- **Search by Type**: Search for movies, TV shows, or other content types using the `type` parameter in the `search()` method.\n- **File List**: Fetch the list of available files for a given share key. This is useful for accessing individual episodes, seasons, or other media content.\n- **Download Links**: Retrieve direct download links for video files in multiple qualities (HD, SD, etc.).\n- **Encryption**: All API requests to **Showbox** are encrypted for security using **TripleDES** and **MD5** hashing.\n\n---\n\n## 🛠️ Advanced Usage\n\n### **Customizing Parameters**\n\nYou can customize parameters when calling the `search()` method for more specific results:\n\n```js\nconst searchResults = await api.search('the godfather', 'movie', 2, 30);\n```\n\n- **title**: The movie or show title.\n- **type**: Type of content (`movie`, `tv`, `all`).\n- **page**: The page number (default: 1).\n- **pagelimit**: Number of results per page (default: 20).\n\n### **Handling File Links**\n\nFor each file retrieved, you can fetch its download links by calling `getLinks()`:\n\n```js\nconst links = await febboxApi.getLinks(febBoxId, file.fid);\nconsole.log('📡 File Links:', links);\n```\n\n---\n\n## Docker Setup\n\n### Build and Run\n\nTo build and start the application in detached mode, use:\n\n```bash\ndocker-compose up -d --build\n```\n---\n\n## API Documentation\n\nThis API provides access to the Showbox and Febbox services, allowing you to search for movies and TV shows, fetch detailed information, and get download links from Febbox.\n\n### Base URL\n```\nhttp://localhost:3000/api\n```\n\n### Endpoints\n\n#### 1. **Search Movies or TV Shows**\nSearch for movies or TV shows by title. You can specify the type (`movie`, `tv`, or `all`), and customize the pagination with `page` and `pagelimit`.\n\n- **Endpoint:**\n  ```\n  GET /api/search/:type\n  ```\n  \n- **Parameters:**\n  - `type`: The type of content to search (`all`, `movie`, `tv`).\n  - `title`: The title to search for.\n  - `page`: The page number (default: 1).\n  - `pagelimit`: The number of results per page (default: 20).\n\n- **Example:**\n  - Search for TV shows with title \"Breaking Bad\":\n    ```\n    http://localhost:3000/api/search/tv?title=breaking%20bad\n    ```\n  - Search for movies with title \"Ratatouille\":\n    ```\n    http://localhost:3000/api/search/movie?title=Ratatouille\n    ```\n\n#### 2. **Get Movie Details**\nFetch details for a specific movie.\n\n- **Endpoint:**\n  ```\n  GET /api/movie/:id\n  ```\n  \n- **Parameters:**\n  - `id`: The ID of the movie.\n\n- **Example:**\n  - Get details for movie with ID `899`:\n    ```\n    http://localhost:3000/api/movie/899\n    ```\n\n#### 3. **Get Show Details**\nFetch details for a specific TV show.\n\n- **Endpoint:**\n  ```\n  GET /api/show/:id\n  ```\n\n- **Parameters:**\n  - `id`: The ID of the TV show.\n\n- **Example:**\n  - Get details for show with ID `125`:\n    ```\n    http://localhost:3000/api/show/125\n    ```\n\n#### 4. **Get Febbox ID**\nRetrieve the Febbox ID for a specific movie or TV show.\n\n- **Endpoint:**\n  ```\n  GET /api/febbox/id\n  ```\n\n- **Parameters:**\n  - `id`: The ID of the movie or show.\n  - `type`: The type of content (`1` for movie, `2` for TV show).\n\n- **Example:**\n  - Get FebBox ID for TV show with ID `125`:\n    ```\n    http://localhost:3000/api/febbox/id?id=125\u0026type=2\n    ```\n\n#### 5. **Get File List from Febbox**\nFetch a list of files from a shared Febbox folder. Optionally, navigate subfolders using the `parent_id` parameter.\n\n- **Endpoint:**\n  ```\n  GET /api/febbox/files/:shareKey\n  ```\n\n- **Parameters:**\n  - `shareKey`: The share key of the Febbox folder.\n  - `parent_id`: The ID of the parent folder (default: 0).\n\n- **Example:**\n  - Get file list from FebBox folder:\n    ```\n    http://localhost:3000/api/febbox/files/fNBTg8at\n    ```\n  - Navigate to subfolder (e.g., `season`):\n    ```\n    http://localhost:3000/api/febbox/files/fNBTg8at?parent_id=2636635\n    ```\n#### 6. **Autocomplete**\nFetch autocomplete suggestions for a given title.\n- **Endpoint:**\n  ```\n  GET /api/autocomplete\n  ```\n- **Parameters:**\n  - `keyword`: The keyword to search for.\n\n- **Example:**\n  - Get autocomplete suggestions for \"breaking\":\n    ```\n    http://localhost:3000/api/autocomplete?keyword=breaking\n    ```\n\n#### 7. **Get Download Links for a File**\nFetch download links for a specific file from Febbox.\n\n- **Endpoint:**\n  ```\n  GET /api/febbox/links/:shareKey/:fid\n  ```\n\n- **Parameters:**\n  - `shareKey`: The share key of the Febbox folder.\n  - `fid`: The file ID.\n  \n- **Example:**\n  - Get download links for file with ID `2636650`:\n    ```\n    http://localhost:3000/api/febbox/links/fNBTg8at/2636650\n    ```\n\n### Sample Requests\n\n1. **Search for TV Shows:**\n   - `http://localhost:3000/api/search/tv?title=breaking%20bad`\n\n2. **Search for Movies:**\n   - `http://localhost:3000/api/search/movie?title=Ratatouille`\n\n3. **Get Movie Details:**\n   - `http://localhost:3000/api/movie/899`\n\n4. **Get Show Details:**\n   - `http://localhost:3000/api/show/125`\n\n5. **Get Febbox ID for TV Show:**\n   - `http://localhost:3000/api/febbox/id?id=125\u0026type=2`\n\n6. **Get Febbox Files (Default Folder):**\n   - `http://localhost:3000/api/febbox/files/fNBTg8at`\n\n7. **Get Febbox Files (Subfolder Navigation):**\n   - `http://localhost:3000/api/febbox/files/fNBTg8at?parent_id=2636635`\n\n8. **Get Download Links from Febbox:**\n   - `http://localhost:3000/api/febbox/links/fNBTg8at/2636650`\n\n---\n\n\n## 🤝 Contributing\n\nWe welcome contributions! If you'd like to add features, fix bugs, or improve the documentation, feel free to:\n\n1. Fork the repository.\n2. Create a feature branch.\n3. Commit your changes.\n4. Push to the branch and create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fshow_feb_box_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsayed85%2Fshow_feb_box_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fshow_feb_box_api/lists"}