# datadiver-ai
**Repository Path**: yingyiyl/datadiver-ai
## Basic Information
- **Project Name**: datadiver-ai
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-04-14
- **Last Updated**: 2025-04-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# π DataDiver AI
**`datadiver-ai`** is the ultimate tool for π web scraping, transforming πΈοΈ unstructured websites into β¨ clean JSON. Easily extract π paragraphs, π lists, π links, and πΌοΈ images with our π§ AI-powered processing.






|
> [!IMPORTANT]
> Extract **`structured data`** from any website with a simple **`API`**!π
## π Overview
DataDiver AI is an intelligent web scraping tool that transforms unstructured web pages into **`clean`**, **`organized`** JSON data. Perfect for **`research`**, **`data analysis`**, **`content aggregation`**, and more!
## β¨ Features
- π **`Universal Scraping`** - Works with virtually any website
- π§ **`AI-Powered`** - Uses Mistral AI for intelligent data processing
- π§© **`Structured Output`** - Converts messy HTML into clean, consistent JSON
- π **`Content Categorization`** - Automatically organizes content by section
- π **`Rich Content Support`** - Extracts paragraphs, lists, links, and images
- π» **`Simple API`** - Easy-to-use interface for quick integration
## π οΈ Tech Stack
- `βοΈ` Next.js + React
- `π` TypeScript
- `π` JSDOM for HTML parsing
- `π§ ` Mistral API for optimization
- `π¨` Custom CSS for beautiful UI
## π¦ Installation
```bash
# Clone the repository
git clone https://github.com/divyanshudhruv/datadiver-ai.git
# Navigate to project directory
cd datadiver-ai
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Add your Mistral API key to .env file
```
## π Getting Started
```bash
# Start the development server
npm run dev
# Open your browser and navigate to
http://localhost:3000
```
## π Usage
### Web Interface
1. Enter the **`URL`** you want to scrape
2. Click **`"Scrape"`**
3. View the structured **`JSON`** output
### API Example
```typescript
// Fetch data from a URL
const response = await fetch("/api/scrape", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com" })
});
const data = await response.json();
console.log(data);
```
## π Example Response
```json
{
"success": true,
"url": "https://example.com",
"data": {
"title": "Example Website",
"meta": {
"description": "This is an example website"
},
"content": {
"about_us": {
"title": "About Us",
"items": [
{
"type": "paragraph",
"text": "We are a sample company demonstrating DataDiver AI"
},
{
"type": "list",
"listType": "unordered",
"items": ["Feature 1", "Feature 2", "Feature 3"]
}
]
}
}
}
}
```
## π€ Contributing
Contributions are **`welcome`**! Please feel free to submit a **`Pull Request`**.
```bash
# Create a new branch
git checkout -b feature/amazing-feature
# Make your changes and commit them
git commit -m 'Add some amazing feature'
# Push to the branch
git push origin feature/amazing-feature
# Open a Pull Request
```
## π License
This project is licensed under the **`MIT License`** - see the **`LICENSE`** file for details.