π Live Demo Β· π¦ GitHub Repo Β· Report Bug Β· Request Feature
Tired of manually selecting and copying tags for your AI prompts or image organization? Booru Tag Extractor streamlines the process. Just paste a post URL, and let the tool handle the rest!
- π€ Automatic Extraction: Paste a URL, and tags appear automatically (configurable).
- π·οΈ Smart Categorization: Tags are automatically sorted into:
Copyright
Character
General
Meta
Other (Artist, etc.)
- π¨ Sleek & Modern UI: Clean interface built with Tailwind CSS and Framer Motion.
- π Dark Mode: Comfortable viewing in any lighting condition.
- π Intuitive Filtering: Easily toggle categories to customize your tag list.
- π Effortless Copy-Paste: Copy the filtered, comma-separated tags with a single click.
- π± Responsive Design: Looks and works great on desktop, tablet, and mobile.
- π Reliable Fetching: Uses a CORS proxy (
AllOrigins
) to bypass browser restrictions.
The extractor currently supports fetching data from the following booru-style sites:
Site Name | Status |
---|---|
Danbooru | Supported |
Safebooru (Donmai) | Supported |
Safebooru (Org) | Supported |
Gelbooru | Supported |
Rule34 | Supported |
e621 | Supported |
AIBooru | Supported |
Yande.re | Supported |
Konachan | Supported |
Anime-Pictures.net | Supported |
Zerochan | Supported |
E-Shuushuu | Supported |
This project also exposes server-side API endpoints that act as a proxy to fetch data from booru sites, primarily to overcome CORS limitations in the browser. You can use these endpoints for your own integrations.
Base URL: https://booruprompt.vercel.app/api/fetch-booru
Fetches the raw HTML content of a given booru post page URL.
- Endpoint:
/api/fetch-booru
- Method:
POST
- Headers:
Content-Type: application/json
- Body (JSON):
{ "targetUrl": "YOUR_BOORU_POST_URL" }
- Replace
YOUR_BOORU_POST_URL
with the actual URL of the booru post (e.g.,https://safebooru.org/index.php?page=post&s=view&id=12345
).
- Replace
- Success Response (200 OK):
Content-Type: application/json
- Body:
{ "html": "<!DOCTYPE html>..." // Raw HTML content of the target page }
- Error Response:
- JSON object with an
error
field and an appropriate HTTP status code (e.g., 400, 502, 504). - Example (400 Bad Request):
{ "error": "Invalid target URL provided." }
- Example (502 Bad Gateway):
{ "error": "Failed to fetch page from target site. Status: 404 - Not Found", "status": 404 }
- JSON object with an
- Example (
curl
in PowerShell/Bash):# PowerShell requires backticks (`) for line continuation # Bash uses backslashes (\) # PowerShell Example: curl -X POST "https://booruprompt.vercel.app/api/fetch-booru" ` -H "Content-Type: application/json" ` -d '{"targetUrl": "https://safebooru.org/index.php?page=post&s=list"}' # Bash Example: curl -X POST "https://booruprompt.vercel.app/api/fetch-booru" \ -H "Content-Type: application/json" \ -d '{"targetUrl": "https://safebooru.org/index.php?page=post&s=list"}'
Fetches and proxies an image from a given URL. This is mainly used by the frontend for previews but can be used as a simple image proxy.
- Endpoint:
/api/fetch-booru
- Method:
GET
- Query Parameter:
imageUrl
: The URL of the image to fetch. Important: Ensure this URL is properly URL-encoded if it contains special characters like&
,?
, etc.
- Success Response (200 OK):
- Headers: Includes
Content-Type
(e.g.,image/jpeg
) andCache-Control
from the upstream source (or a default). - Body: The raw image data.
- Headers: Includes
- Error Response:
- Plain text error message with an appropriate HTTP status code (e.g., 400, 502, 504).
- Example (
curl
):# Fetches the image and saves it as output.jpg # Replace YOUR_IMAGE_URL with the actual, URL-encoded image URL curl "https://booruprompt.vercel.app/api/fetch-booru?imageUrl=YOUR_IMAGE_URL" -o output.jpg # Example with a (simplified) URL - real URLs might need encoding curl "https://booruprompt.vercel.app/api/fetch-booru?imageUrl=https%3A%2F%2Fsafebooru.org%2Fimages%2F4699%2Ff7b8d9...sample.jpg" -o sample_image.jpg
Notes:
- The API uses a specific
User-Agent
:BooruTagExtractor/1.1 (Server-Side Proxy; +http://localhost/)
. - Requests have a timeout of 25 seconds.
- Please use this API responsibly. It relies on the Vercel Hobby plan infrastructure.
Get the project up and running on your local machine.
-
Clone the repository:
git clone https://github.com/IRedDragonICY/booruprompt.git cd booruprompt
-
Install dependencies:
# Using npm npm install # Using yarn # yarn install # Using pnpm # pnpm install
-
Run the development server:
# Using npm npm run dev # Using yarn # yarn dev # Using pnpm # pnpm dev
-
Open http://localhost:3000 in your browser.
- Paste URL: Copy a direct link to a post page from a supported booru site (e.g.,
https://danbooru.donmai.us/posts/123456
) and paste it into the input field. - Wait (or Click):
- If Automatic Extraction is enabled (default), tags and a preview should load shortly after pasting.
- Otherwise, click the "Extract Manually" button.
- Filter (Optional): Use the category toggles below the preview to show/hide specific tag types. The tag count updates dynamically.
- Copy: Click the "Copy Tags" button to copy the currently displayed, comma-separated tags to your clipboard.
- Next.js: React framework for production.
- React: Library for building user interfaces.
- TypeScript: Typed superset of JavaScript.
- Tailwind CSS: Utility-first CSS framework.
- Framer Motion: Animation library for React.
- DOMParser API: Native browser API for parsing HTML fetched via proxy.
This project uses the standard Next.js App Router structure.
dev
: Starts the development server (usually onlocalhost:3000
).build
: Creates a production-ready build.start
: Runs the production build.lint
: Lints the codebase using ESLint.
Contributions make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please ensure your code adheres to the project's linting rules and includes updates to documentation if necessary.
Distributed under the MIT License. See LICENSE
file for more information.
IRedDragonICY - @IRedDragonICY
Project Link: https://github.com/IRedDragonICY/booruprompt
File bugs or suggest features via GitHub Issues.
- The teams behind the amazing Booru websites.
- AllOrigins for the reliable CORS proxy service.
- Vercel for seamless hosting.
- All the open-source libraries and tools that made this project possible.
Made with β₯ by IRedDragonICY