An open API service indexing awesome lists of open source software.

https://github.com/developersdigest/bright-data


https://github.com/developersdigest/bright-data

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

This is a Next.js web application that provides a simple interface for searching Google using an API. The main components are:

1. Frontend (app/page.tsx):
- A search input and button to enter a query
- Displays JSON results from the search API

2. Backend API (app/api/bright-data/route.ts):
- Handles POST requests to search Google
- Uses Bright Data's web unlocker proxy to access search results
- Converts HTML results to Markdown
- Has special handling for Amazon product searches using Puppeteer

3. Configuration:
- Next.js config (next.config.mjs)
- Tailwind CSS config (tailwind.config.ts, postcss.config.mjs)
- TypeScript config (tsconfig.json)

4. Dependencies:
- Next.js for the framework
- React for the UI
- Tailwind CSS for styling
- Puppeteer for web scraping
- Other utilities like Turndown for HTML to Markdown conversion

The app allows users to enter a search query, makes a request to the backend API, which then uses Bright Data's proxy to access Google search results, and displays the results as JSON on the page. It has special handling for Amazon product searches to extract specific product details.

Key files:
- app/page.tsx - Main page component
- app/api/bright-data/route.ts - Backend API route
- app/layout.tsx - Root layout component
- package.json - Dependencies and scripts