### Clone and Install Dependencies with Bun Source: https://github.com/sh20raj/30tools/blob/main/README.md Clone the repository and install project dependencies using Bun. This is the initial setup step for development. ```bash git clone https://github.com/sh20raj/30tools.git cd 30tools bun install ``` -------------------------------- ### Clone the 30tools Repository Source: https://github.com/sh20raj/30tools/blob/main/CONTRIBUTING.md Clone the project repository to your local machine. This is the first step before installing dependencies and starting development. ```bash git clone https://github.com/sh20raj/30tools.git cd 30tools ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/sh20raj/30tools/blob/main/CONTRIBUTING.md Install project dependencies using Bun. Bun is recommended for its high-performance build capabilities. ```bash bun install ``` -------------------------------- ### Landing Page Integration Example Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Example of integrating the full UnstoryOpenmindCTA component into a landing page. Ensure the component is imported correctly at the top of your page file. ```jsx // In landing page import UnstoryOpenmindCTA from "@/components/shared/UnstoryOpenmindCTA"; export default function LandingPage() { return (
{/* Other content */} {/* Other content */}
); } ``` -------------------------------- ### Sidebar Integration Example Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Example of integrating the compact UnstoryOpenmindCTA component into a sidebar or other secondary areas. This provides a less intrusive call to action. ```jsx // In sidebar or secondary areas import UnstoryOpenmindCTACompact from "@/components/shared/UnstoryOpenmindCTACompact"; export default function Sidebar() { return ( ); } ``` -------------------------------- ### Launch Development Workspace Source: https://github.com/sh20raj/30tools/blob/main/CONTRIBUTING.md Start the development server to work on the project. This command launches the workspace for local development. ```bash bun dev ``` -------------------------------- ### Video Downloader API - TikTok Example Source: https://context7.com/sh20raj/30tools/llms.txt Downloads videos from TikTok by providing the video URL. The API returns various quality options, including watermarked and non-watermarked versions, as well as audio-only. ```bash curl -X POST "https://30tools.com/api/video-downloader" \ -H "Content-Type: application/json" \ -d '{"url": "https://www.tiktok.com/@user/video/1234567890"}' ``` -------------------------------- ### Get IndexNow Service Information using cURL Source: https://context7.com/sh20raj/30tools/llms.txt Retrieve information about the IndexNow API service, including its key and instructions for submitting URLs. This endpoint does not require any parameters. ```bash curl "https://30tools.com/api/indexnow" ``` -------------------------------- ### Get OpenSearch Suggestions using cURL Source: https://context7.com/sh20raj/30tools/llms.txt This cURL command retrieves autocomplete suggestions in OpenSearch format for a given query. It's useful for integrating search functionality into web applications. ```bash curl "https://30tools.com/api/suggestions?q=image" ``` -------------------------------- ### Download YouTube Transcript using TypeScript Source: https://context7.com/sh20raj/30tools/llms.txt Use `downloadYouTubeTranscript` to get video transcripts in various formats (SRT, VTT, JSON). Specify the video URL and language code. The function returns plain text along with structured formats. ```typescript import { downloadYouTubeTranscript } from "@/lib/youtube-actions"; const transcript = await downloadYouTubeTranscript("https://youtube.com/watch?v=dQw4w9WgXcQ", "en"); // Result: { success: true, data: { plainText: "...", srtContent: "...", vttContent: "...", jsonContent: "..." }} ``` -------------------------------- ### Get YouTube Video Metadata using TypeScript Source: https://context7.com/sh20raj/30tools/llms.txt Use the `getYouTubeVideoMetadata` function to fetch video details like title and channel name via the oEmbed API. The video ID is required as an argument. ```typescript import { getYouTubeVideoMetadata } from "@/lib/youtube-actions"; const metadata = await getYouTubeVideoMetadata("dQw4w9WgXcQ"); // Result: { success: true, title: "Rick Astley - Never Gonna Give You Up", channelName: "Rick Astley", channelUrl: "..." } ``` -------------------------------- ### Deploy to Cloudflare Source: https://github.com/sh20raj/30tools/blob/main/README.md Execute the deployment script to deploy the 30tools project to Cloudflare. This command automates the deployment process. ```bash bun run deploy ``` -------------------------------- ### Run Project Linting Source: https://github.com/sh20raj/30tools/blob/main/CONTRIBUTING.md Execute the linter to check code quality and style. This command uses Biome for linting and should be run before submitting code. ```bash bun lint ``` -------------------------------- ### Extract YouTube Video ID using TypeScript Source: https://context7.com/sh20raj/30tools/llms.txt Import and use the `extractYouTubeVideoId` function to get a YouTube video ID from various URL formats. Ensure the function is correctly imported from '@/lib/youtube-actions'. ```typescript import { extractYouTubeVideoId } from "@/lib/youtube-actions"; const result = await extractYouTubeVideoId("https://youtu.be/dQw4w9WgXcQ"); // Result: { success: true, videoId: "dQw4w9WgXcQ" } ``` -------------------------------- ### Submit URLs for Indexing using cURL Source: https://context7.com/sh20raj/30tools/llms.txt Use this cURL command to submit URLs for instant indexing across Bing, Yandex, and Naver using the IndexNow protocol. The request body is empty, and the API handles the submission. ```bash curl -X POST "https://30tools.com/api/indexnow" ``` -------------------------------- ### Apply Design System Classes to a Section Source: https://github.com/sh20raj/30tools/blob/main/docs/DESIGN_SYSTEM.md Use the 'ds-section' class for root page surface and text baseline, 'ds-container' for content width, 'ds-eyebrow' for compact labels, 'ds-heading' for heading rhythm, and 'ds-prose' for readable line length. The 'text-balance' class helps with heading wraps. ```jsx

Utility

URL Shortener

Create short, trackable links with custom aliases.

``` -------------------------------- ### Import and Use UnstoryOpenmindCTACompact Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Import the compact version of the UnstoryOpenmindCTA component for use in sidebars or secondary placements. This version offers a streamlined design with key metrics and a single CTA. ```jsx import UnstoryOpenmindCTACompact from "@/components/shared/UnstoryOpenmindCTACompact"; ; ``` -------------------------------- ### Import and Use UnstoryOpenmindCTA Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Import the full version of the UnstoryOpenmindCTA component and use it in your React application. This component is suitable for landing pages and main promotional sections. ```jsx import UnstoryOpenmindCTA from "@/components/shared/UnstoryOpenmindCTA"; ; ``` -------------------------------- ### Basic Tool Search API Source: https://context7.com/sh20raj/30tools/llms.txt Performs a fuzzy search across all 733+ tools. Results are ranked by relevance and can be filtered by category. ```bash curl "https://30tools.com/api/search?q=image" ``` ```bash curl "https://30tools.com/api/search?q=compress&category=image" ``` -------------------------------- ### Summarize YouTube Transcript using cURL Source: https://context7.com/sh20raj/30tools/llms.txt Use this cURL command to send a YouTube transcript and video details to the summarization API. The API supports integration with OpenAI or Gemini for enhanced analysis. ```bash curl -X POST "https://30tools.com/api/youtube/summarize" \ -H "Content-Type: application/json" \ -d '{ "transcript": "Full transcript text here...", "title": "Video Title", "duration": "10:30" }' ``` -------------------------------- ### Tool Search API Response Format Source: https://context7.com/sh20raj/30tools/llms.txt Illustrates the structure of a successful response from the Tool Search API, including tool details, total count, and available categories. ```json { "query": "image", "results": [ { "id": "image-compressor", "name": "Image Compressor", "description": "Compress images without losing quality...", "route": "/image-compressor", "categoryKey": "image", "categoryName": "Image Tools", "score": 125 } ], "total": 45, "categories": ["generators", "image", "pdf", "video", "audio", "developer"] } ``` -------------------------------- ### IndexNow API Source: https://context7.com/sh20raj/30tools/llms.txt Submits URLs to Bing, Yandex, and Naver search engines for instant indexing using the IndexNow protocol. ```APIDOC ## IndexNow API ### Submit URLs for Indexing #### Description Submits URLs to Bing, Yandex, and Naver search engines for instant indexing using the IndexNow protocol. #### Method POST #### Endpoint /api/indexnow #### Request Body (No specific request body defined for submitting URLs, assumes it's handled server-side or via configuration) #### Response ##### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **urlsSubmitted** (integer) - The total number of URLs submitted. - **bing** (object) - Response details for Bing submission. - **status** (integer) - HTTP status code from Bing. - **ok** (boolean) - Indicates if the submission to Bing was successful. - **yandex** (object) - Response details for Yandex submission. - **status** (integer) - HTTP status code from Yandex. - **ok** (boolean) - Indicates if the submission to Yandex was successful. - **naver** (object) - Response details for Naver submission. - **status** (integer) - HTTP status code from Naver. - **ok** (boolean) - Indicates if the submission to Naver was successful. #### Response Example ```json { "success": true, "urlsSubmitted": 75, "bing": { "status": 200, "ok": true }, "yandex": { "status": 200, "ok": true }, "naver": { "status": 200, "ok": true } } ``` ### Get IndexNow Service Info #### Description Retrieves information about the IndexNow service, including the API key and instructions. #### Method GET #### Endpoint /api/indexnow #### Response ##### Success Response (200) - **service** (string) - The name of the service. - **key** (string) - The API key for the IndexNow service. - **instructions** (string) - Instructions on how to use the API. #### Response Example ```json { "service": "IndexNow API", "key": "634a2c77198a45429967eb9dc1252278", "instructions": "POST to this endpoint to submit all URLs to Bing + Yandex + Naver for instant indexing." } ``` ``` -------------------------------- ### YouTube Server Actions Source: https://context7.com/sh20raj/30tools/llms.txt Server-side functions for YouTube operations including video ID extraction, metadata fetching, thumbnail generation, transcript downloading, and AI-powered content generation. ```APIDOC ## YouTube Server Actions ### Extract YouTube Video ID #### Description Extracts the YouTube video ID from various URL formats. #### Method Import function `extractYouTubeVideoId` #### Example ```typescript import { extractYouTubeVideoId } from "@/lib/youtube-actions"; const result = await extractYouTubeVideoId("https://youtu.be/dQw4w9WgXcQ"); // Result: { success: true, videoId: "dQw4w9WgXcQ" } ``` ### Get YouTube Video Metadata #### Description Fetches video metadata using the oEmbed API. #### Method Import function `getYouTubeVideoMetadata` #### Parameters - **videoId** (string) - Required - The YouTube video ID. #### Example ```typescript import { getYouTubeVideoMetadata } from "@/lib/youtube-actions"; const metadata = await getYouTubeVideoMetadata("dQw4w9WgXcQ"); // Result: { success: true, title: "Rick Astley - Never Gonna Give You Up", channelName: "Rick Astley", channelUrl: "..." } ``` ### Generate Thumbnail URLs #### Description Generates all available thumbnail URLs for a given YouTube video. #### Method Import function `generateThumbnailUrls` #### Parameters - **videoId** (string) - Required - The YouTube video ID. #### Example ```typescript import { generateThumbnailUrls } from "@/lib/youtube-actions"; const thumbnails = await generateThumbnailUrls("dQw4w9WgXcQ"); // Result: { success: true, thumbnails: [ // { name: "Default (120x90)", url: "https://img.youtube.com/vi/dQw4w9WgXcQ/default.jpg", quality: "low" }, // { name: "Max Resolution (1280x720)", url: "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg", quality: "maxres" } // ]} ``` ### Download YouTube Transcript #### Description Downloads the transcript of a YouTube video in multiple formats (SRT, VTT, JSON). #### Method Import function `downloadYouTubeTranscript` #### Parameters - **videoUrl** (string) - Required - The URL of the YouTube video. - **language** (string) - Required - The language code for the transcript (e.g., "en"). #### Example ```typescript import { downloadYouTubeTranscript } from "@/lib/youtube-actions"; const transcript = await downloadYouTubeTranscript("https://youtube.com/watch?v=dQw4w9WgXcQ", "en"); // Result: { success: true, data: { plainText: "...", srtContent: "...", vttContent: "...", jsonContent: "..." }} ``` ``` -------------------------------- ### Client-Side Image Compression Logic Source: https://context7.com/sh20raj/30tools/llms.txt Handles image compression using the Canvas API, including scaling and WebP optimization. Ensure the input is a File object and quality is between 0 and 100. ```javascript // ImageCompressorTool component usage import ImageCompressorTool from "@/components/tools/image/ImageCompressorTool"; // The component handles: // - Drag and drop file upload // - Quality slider (0-100%) // - Automatic format optimization (JPEG/WebP) // - Max dimension scaling (2048px) // - Batch processing with progress tracking // Internal compression function logic: const compressImage = async (file, quality) => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); const img = new Image(); img.src = URL.createObjectURL(file); await img.decode(); // Scale dimensions if needed let { width, height } = img; const maxDimension = 2048; if (width > maxDimension || height > maxDimension) { const ratio = Math.min(maxDimension / width, maxDimension / height); width *= ratio; height *= ratio; } canvas.width = width; canvas.height = height; ctx.drawImage(img, 0, 0, width, height); // Output as WebP or JPEG return new Promise(resolve => { canvas.toBlob(blob => resolve(blob), "image/webp", quality / 100); }); }; ``` -------------------------------- ### YouTube Transcript API Source: https://context7.com/sh20raj/30tools/llms.txt Fetches video transcripts from YouTube, supporting multiple languages. It provides both timestamped segments and full text, utilizing the NoteGPT API. ```bash curl "https://30tools.com/api/youtube/transcript?videoId=dQw4w9WgXcQ&lang=en" ``` -------------------------------- ### YouTube Video Summarization API Source: https://context7.com/sh20raj/30tools/llms.txt Generates AI-powered summaries, key points, and insights from YouTube video transcripts. Supports integration with OpenAI or Gemini for enhanced analysis. ```APIDOC ## POST /api/youtube/summarize ### Description Generates AI-powered summaries, key points, and insights from YouTube video transcripts. ### Method POST ### Endpoint /api/youtube/summarize ### Parameters #### Request Body - **transcript** (string) - Required - The full transcript text of the YouTube video. - **title** (string) - Required - The title of the YouTube video. - **duration** (string) - Required - The duration of the YouTube video (e.g., "10:30"). ### Request Example ```json { "transcript": "Full transcript text here...", "title": "Video Title", "duration": "10:30" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the summarization results. - **summary** (string) - The AI-generated summary of the video. - **keyPoints** (array) - An array of key points from the video. - **insights** (string) - Analytical insights about the video content. #### Response Example ```json { "success": true, "data": { "summary": "This video titled \"Video Title\" (10:30) covers the following:\n\nIntroduction...\n\nConclusion...", "keyPoints": [ "First important point mentioned...", "Key concept explained...", "Final takeaway..." ], "insights": "Video Analysis:\n\n• Total word count: 1500 words\n• Estimated reading time: 8 minutes\n• Topic: Video Title" } } ``` ``` -------------------------------- ### Twitter/X Video Download API Source: https://context7.com/sh20raj/30tools/llms.txt Downloads videos from Twitter/X posts using the Twmate service. Requires a POST request with the video URL in JSON format. ```bash curl -X POST "https://30tools.com/api/twitter-download" \ -H "Content-Type: application/json" \ -d '{"url": "https://x.com/user/status/1234567890"}' ``` -------------------------------- ### Adding Testimonials Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Update the `testimonials` array to add new testimonials to the component. Each testimonial should include the text, author, and an optional emotion. ```javascript const testimonials = [ { text: "Your testimonial here...", author: "User Name", emotion: "grateful", }, // Add more testimonials... ]; ``` -------------------------------- ### Access Tool Catalog Data Source: https://context7.com/sh20raj/30tools/llms.txt Use these functions to retrieve information about tools and categories from the tool catalog. Ensure the library is correctly imported. ```typescript import { getAllTools, getToolByRoute, getToolById, getAllCategories, getCategoryBySlug, getRelatedTools } from "@/lib/tools"; // Get all 733+ tools const tools = getAllTools(); // Returns: Tool[] with id, name, description, route, category, extraSlugs, popular, etc. // Find tool by its route const compressor = getToolByRoute("/image-compressor"); // Returns: { id: "image-compressor", name: "Image Compressor", route: "/image-compressor", ... } // Get tool by ID const tool = getToolById("pdf-merger"); // Get all categories const categories = getAllCategories(); // Returns: [{ name: "Image Tools", slug: "image-tools", icon: "ImageIcon", tools: [...] }, ...] // Get related tools from same category const related = getRelatedTools(tool, 5); // Returns up to 5 tools from the same category ``` -------------------------------- ### Twitter/X Video Download API Source: https://context7.com/sh20raj/30tools/llms.txt A dedicated endpoint for downloading videos from Twitter/X posts, using the Twmate service for video extraction. ```APIDOC ## POST /api/twitter-download ### Description Downloads videos from Twitter/X posts by leveraging the Twmate service. ### Method POST ### Endpoint /api/twitter-download #### Request Body - **url** (string) - Required - The URL of the Twitter/X post containing the video. ### Request Example ```json { "url": "https://x.com/user/status/1234567890" } ``` ### Response #### Success Response (200) - **html** (string) - HTML content containing the video download links. This HTML needs to be parsed to extract the actual download URLs. #### Response Example ```json { "html": "" } ``` ``` -------------------------------- ### Generate SEO Metadata Source: https://context7.com/sh20raj/30tools/llms.txt Utilities for creating SEO-optimized metadata, Open Graph tags, and JSON-LD structured data for web pages, particularly tool pages. ```typescript import { generateMetadata, generateWebAppSchema, generateFAQSchema, generateToolSchema } from "@/lib/seo"; // Generate page metadata const metadata = generateMetadata({ title: "Free Image Compressor - Reduce Image Size Online | 30tools", description: "Compress images without losing quality. Free online tool with no signup required.", path: "/image-compressor", image: "/og-images/image-compressor.png" }); // Generate WebApplication JSON-LD schema const webAppSchema = generateWebAppSchema({ name: "Image Compressor", description: "Compress and optimize images online", path: "/image-compressor", category: "MultimediaApplication" }); // Output: { "@context": "https://schema.org", "@type": "WebApplication", ... } // Generate FAQ schema for rich snippets const faqSchema = generateFAQSchema([ { question: "How does image compression work?", answer: "Our tool uses..." }, { question: "Is my data secure?", answer: "Yes, all processing happens..." } ]); // Generate SoftwareApplication schema with ratings const toolSchema = generateToolSchema({ name: "PDF Merger", description: "Merge multiple PDF files into one", path: "/pdf-merger" }); ``` -------------------------------- ### OpenRouter AI Text Generation Source: https://context7.com/sh20raj/30tools/llms.txt Core AI service for text generation using the OpenRouter API with the DeepSeek V3 model. Supports simple text generation and template-based responses. ```typescript import { generateText, generateWithTemplate } from "@/lib/ai-services/openrouter-service"; // Simple text generation const response = await generateText( "Write a catchy YouTube video title about cooking", "You are a creative content strategist", { temperature: 0.8, maxTokens: 100 } ); // Result: { success: true, content: "5 Kitchen Hacks That Will Change Your Life!", model: "deepseek/deepseek-chat-v3-0324" } // Template-based generation const scriptResponse = await generateWithTemplate( "Write a {{duration}} minute YouTube script about {{topic}} for {{audience}}", { duration: "10", topic: "web development", audience: "beginners" }, { temperature: 0.7, maxTokens: 4000 } ); // Result: { success: true, content: "[Full script content...]", usage: { prompt_tokens: 50, completion_tokens: 2000 } } ``` -------------------------------- ### OpenSearch Suggestions API Source: https://context7.com/sh20raj/30tools/llms.txt Returns autocomplete suggestions in OpenSearch format for integration with browser search bars and search widgets. ```APIDOC ## GET /api/suggestions ### Description Returns autocomplete suggestions in OpenSearch format for integration with browser search bars and search widgets. ### Method GET ### Endpoint /api/suggestions ### Query Parameters - **q** (string) - Required - The search query string. ### Response #### Success Response (200) - Returns an array where the first element is the query string and the second element is an array of suggestion strings. ### Response Example ```json ["image", ["image compressor", "image converter", "image optimizer", "image editor"]] ``` ``` -------------------------------- ### Generate YouTube Thumbnail URLs using TypeScript Source: https://context7.com/sh20raj/30tools/llms.txt The `generateThumbnailUrls` function creates all available thumbnail URLs for a given YouTube video ID. The output includes thumbnail names, URLs, and quality. ```typescript import { generateThumbnailUrls } from "@/lib/youtube-actions"; const thumbnails = await generateThumbnailUrls("dQw4w9WgXcQ"); // Result: { success: true, thumbnails: [ // { name: "Default (120x90)", url: "https://img.youtube.com/vi/dQw4w9WgXcQ/default.jpg", quality: "low" }, // { name: "Max Resolution (1280x720)", url: "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg", quality: "maxres" } // ]} ``` -------------------------------- ### Tool Search API Source: https://context7.com/sh20raj/30tools/llms.txt Provides fuzzy search across all 733+ tools with relevance scoring. It searches tool names, descriptions, keywords, and routes, returning ranked results with category filtering support. ```APIDOC ## GET /api/search ### Description Performs a fuzzy search across all available tools, returning ranked results with optional category filtering. ### Method GET ### Endpoint /api/search #### Query Parameters - **q** (string) - Required - The search query string. - **category** (string) - Optional - Filters search results by a specific category. ### Response #### Success Response (200) - **query** (string) - The original search query. - **results** (array) - An array of tool objects matching the query. - **id** (string) - Unique identifier for the tool. - **name** (string) - The name of the tool. - **description** (string) - A brief description of the tool. - **route** (string) - The URL path to the tool. - **categoryKey** (string) - The key identifier for the tool's category. - **categoryName** (string) - The display name of the tool's category. - **score** (number) - The relevance score of the tool for the given query. - **total** (number) - The total number of tools found. - **categories** (array) - A list of available category keys. #### Response Example ```json { "query": "image", "results": [ { "id": "image-compressor", "name": "Image Compressor", "description": "Compress images without losing quality...", "route": "/image-compressor", "categoryKey": "image", "categoryName": "Image Tools", "score": 125 } ], "total": 45, "categories": ["generators", "image", "pdf", "video", "audio", "developer"] } ``` ``` -------------------------------- ### Client-Side PDF Merging Logic Source: https://context7.com/sh20raj/30tools/llms.txt Merges multiple PDF files into a single document using pdf-lib. The input should be a list of File objects. Returns a URL for the merged PDF blob. ```javascript // PdfMerger component usage import PdfMerger from "@/components/tools/pdf/PdfMerger"; // Internal merge logic using pdf-lib: import { PDFDocument } from "pdf-lib"; const mergePdfs = async (fileList) => { const mergedPdf = await PDFDocument.create(); for (const file of fileList) { const fileBuffer = await file.arrayBuffer(); const pdf = await PDFDocument.load(fileBuffer); const copiedPages = await mergedPdf.copyPages(pdf, pdf.getPageIndices()); copiedPages.forEach(page => mergedPdf.addPage(page)); } const pdfBytes = await mergedPdf.save(); const blob = new Blob([pdfBytes], { type: "application/pdf" }); return URL.createObjectURL(blob); }; ``` -------------------------------- ### Video Downloader API Response Format Source: https://context7.com/sh20raj/30tools/llms.txt The response from the Video Downloader API includes success status, video details like title and thumbnail, duration, author, music, available download qualities, and the platform. ```json { "success": true, "data": { "title": "TikTok Video", "thumbnail": "/placeholder-video-thumbnail.jpg", "duration": "0:30", "author": "@tiktoker", "music": "Trending Sound", "qualities": [ { "quality": "HD No Watermark", "size": "8.2 MB", "url": "#", "type": "video" }, { "quality": "SD No Watermark", "size": "4.8 MB", "url": "#", "type": "video" }, { "quality": "Audio Only (MP3)", "size": "1.2 MB", "url": "#", "type": "audio" } ], "platform": "TikTok" } } ``` -------------------------------- ### Enhanced Search API Source: https://context7.com/sh20raj/30tools/llms.txt Provides advanced SEO-optimized search with keyword matching and long-tail keyword support. It also returns SEO metadata for search result pages. ```bash curl "https://30tools.com/api/enhanced-search?q=pdf%20converter&category=all&limit=20" ``` -------------------------------- ### YouTube Transcript API Source: https://context7.com/sh20raj/30tools/llms.txt Fetches video transcripts from YouTube with support for multiple languages, providing both timestamped segments and full text output. Uses the NoteGPT API for reliable transcript extraction. ```APIDOC ## GET /api/youtube/transcript ### Description Retrieves the transcript for a given YouTube video ID in a specified language. ### Method GET ### Endpoint /api/youtube/transcript #### Query Parameters - **videoId** (string) - Required - The unique ID of the YouTube video. - **lang** (string) - Required - The language code for the transcript (e.g., 'en' for English). ### Response #### Success Response (200) (The exact structure of the response for transcripts is not detailed in the provided text, but it is expected to contain timestamped segments and/or full text.) #### Response Example (Example response structure is not provided in the source text.) ``` -------------------------------- ### Customizing Gradient Background Source: https://github.com/sh20raj/30tools/blob/main/src/components/shared/README_UnstoryComponents.md Customize the gradient background of the components by applying Tailwind CSS classes, such as `bg-gradient-to-br` with specific color stops. ```jsx // Custom gradient background ``` -------------------------------- ### Enhanced Search API Response with SEO Data Source: https://context7.com/sh20raj/30tools/llms.txt Shows the response structure for the Enhanced Search API, including detailed search results and generated SEO metadata like title and description. ```json { "results": [ { "id": "pdf-to-word", "name": "PDF to Word Converter", "description": "Convert PDF documents to editable Word files...", "route": "/pdf-to-word-converter", "searchScore": 280, "matchedKeywords": ["pdf converter", "word converter"], "monthlySearches": 150000, "popular": true, "completed": true } ], "query": "pdf converter", "category": "all", "total": 12, "seoData": { "title": "Pdf converter Tools (12 found) | 30tools", "description": "Found 12 professional pdf converter tools. Free online pdf converter with no watermarks required." } } ``` -------------------------------- ### Video Downloader API Source: https://context7.com/sh20raj/30tools/llms.txt Extracts video download links from multiple platforms including TikTok, Facebook, Instagram, Twitter/X, Vimeo, Dailymotion, Reddit, and Rumble. ```APIDOC ## POST /api/video-downloader ### Description Fetches video download links for a given video URL from supported platforms. ### Method POST ### Endpoint /api/video-downloader #### Request Body - **url** (string) - Required - The URL of the video to download. ### Request Example ```json { "url": "https://www.tiktok.com/@user/video/1234567890" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains details about the video and download links. - **title** (string) - The title of the video. - **thumbnail** (string) - URL to the video thumbnail. - **duration** (string) - The duration of the video. - **author** (string) - The author or uploader of the video. - **music** (string) - The music or sound associated with the video. - **qualities** (array) - An array of available download qualities. - **quality** (string) - The name of the download quality (e.g., 'HD No Watermark'). - **size** (string) - The file size for this quality. - **url** (string) - The direct download URL. - **type** (string) - The type of content (e.g., 'video', 'audio'). - **platform** (string) - The platform from which the video was sourced. #### Response Example ```json { "success": true, "data": { "title": "TikTok Video", "thumbnail": "/placeholder-video-thumbnail.jpg", "duration": "0:30", "author": "@tiktoker", "music": "Trending Sound", "qualities": [ { "quality": "HD No Watermark", "size": "8.2 MB", "url": "#", "type": "video" }, { "quality": "SD No Watermark", "size": "4.8 MB", "url": "#", "type": "video" }, { "quality": "Audio Only (MP3)", "size": "1.2 MB", "url": "#", "type": "audio" } ], "platform": "TikTok" } } ``` ``` -------------------------------- ### Check Temporary Email Addresses Source: https://context7.com/sh20raj/30tools/llms.txt Server-side function to detect disposable email addresses using a blocklist. It can check individual emails or domains and provide statistics. ```typescript import { checkTempEmail, getTempEmailStats } from "@/lib/temp-email-actions"; // Check if email is temporary/disposable const result = await checkTempEmail("test@tempmail.com"); // Result: { // success: true, // inputType: "email", // domain: "tempmail.com", // isTemporary: true, // inBlocklist: true, // inAllowlist: false, // recommendation: "This appears to be a temporary/disposable email domain..." // } // Check domain directly const domainCheck = await checkTempEmail("guerrillamail.com"); // Get blocklist statistics const stats = await getTempEmailStats(); // Result: { blocklist: 35000, allowlist: 500, lastUpdated: "2024-01-15T..." } ``` -------------------------------- ### Utility Function for Class Merging Source: https://context7.com/sh20raj/30tools/llms.txt Merges Tailwind CSS classes with conflict resolution, useful for dynamic styling. Requires the 'cn' utility function, typically imported from '@/lib/utils'. ```typescript import { cn } from "@/lib/utils"; // Merge Tailwind classes with conflict resolution const buttonClass = cn( "px-4 py-2 rounded-md", "bg-blue-500 hover:bg-blue-600", isActive && "bg-blue-700", isDisabled && "opacity-50 cursor-not-allowed" ); // Output: "px-4 py-2 rounded-md bg-blue-700" (when isActive=true, isDisabled=false) ```