# browseract-api-examples **Repository Path**: guwei786228836/browseract-api-examples ## Basic Information - **Project Name**: browseract-api-examples - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-10 - **Last Updated**: 2026-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BrowserAct API Demo Collection [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Java](https://img.shields.io/badge/Java-8+-blue.svg)](https://www.oracle.com/java/) [![Node.js](https://img.shields.io/badge/Node.js-14+-green.svg)](https://nodejs.org/) [![Python](https://img.shields.io/badge/Python-3.8+-yellow.svg)](https://www.python.org/) > **AI Web Scraper & Automation** - Any Site, No Code, Zero Limits, Reliable Data This repository contains comprehensive API demo code for [BrowserAct](https://www.browseract.com/), an AI-powered web scraping and automation platform. The demos showcase how to integrate BrowserAct's AI-Workflow capabilities into your applications using multiple programming languages. ## 🚀 Quick Start ### 🎯 For New Users (Recommended) Start with **scenario-based examples** that demonstrate complete workflows: - **Python**: [Scenarios-Python](./Scenarios-Python/) - Complete examples combining multiple APIs - `scenario_1_run_and_wait.py` - Run custom workflow and wait for completion - `scenario_2_run_template_and_wait.py` - Run template task and wait for completion (Best for beginners) - **Java**: [Scenarios-Java](./Scenarios-Java/) - Complete examples combining multiple APIs - `Scenario1RunAndWait.java` - Run custom workflow and wait for completion - `Scenario2RunTemplateAndWait.java` - Run template task and wait for completion - **Node.js**: [Scenarios-NodeJs](./Scenarios-NodeJs/) - Complete examples combining multiple APIs - `scenario1_runAndWait.js` - Run custom workflow and wait for completion - `scenario2_runTemplateAndWait.js` - Run template task and wait for completion ### 📚 For API Reference Choose your preferred language and explore individual API examples: | Language | Workflow API | Scenario Examples | Quick Start | |----------|--------------|-------------------|-------------| | **Python** | [Workflow-Python](./Workflow-Python/) | [Scenarios-Python](./Scenarios-Python/) | `python Scenarios-Python/scenario_1_run_and_wait.py` | | **Java** | [Workflow-Java](./Workflow-Java/) | [Scenarios-Java](./Scenarios-Java/) | `cd Scenarios-Java && mvn exec:java -Dexec.mainClass="com.browseract.scenarios.Scenario1RunAndWait"` | | **Node.js** | [Workflow-NodeJs](./Workflow-NodeJs/) | [Scenarios-NodeJs](./Scenarios-NodeJs/) | `node Scenarios-NodeJs/scenario1_runAndWait.js` | ## 📁 Project Structure ``` browseract-api-examples/ ├── Workflow-Python/ # Python Workflow API demos ├── Workflow-Java/ # Java Workflow API demos ├── Workflow-NodeJs/ # Node.js Workflow API demos ├── Scenarios-Python/ # Python scenario-based examples (recommended for new users) ├── Scenarios-Java/ # Java scenario-based examples (recommended for new users) ├── Scenarios-NodeJs/ # Node.js scenario-based examples (recommended for new users) ├── .gitignore # Git ignore rules └── README.md # This file ``` ## 🎯 What is BrowserAct? BrowserAct is an AI-powered web scraping and automation platform that provides two core capabilities: ### 🔄 AI-Workflow - **Predefined Templates**: Use pre-built workflows for common scraping tasks - **Custom Workflows**: Create your own automation sequences - **Batch Processing**: Handle multiple URLs and data sources efficiently ## 📚 API Capabilities ### Workflow API Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/v2/workflow/run-task` | POST | Start a new workflow task | | `/v2/workflow/run-task-by-template` | POST | Start a new task using official template | | `/v2/workflow/stop-task` | PUT | Permanently terminate a task | | `/v2/workflow/resume-task` | PUT | Resume a paused task | | `/v2/workflow/get-task` | GET | Get detailed task information | | `/v2/workflow/get-task-status` | GET | Get task status only | | `/v2/workflow/list-tasks` | GET | List all tasks | | `/v2/workflow/list-workflows` | GET | List all workflows | | `/v2/workflow/get-workflow` | GET | Get workflow details | | `/v2/workflow/list-official-workflow-templates` | GET | List official workflow templates | | `/v2/workflow/get-region-list` | GET | Get supported region list for proxy | ## 🛠 Language Support ### Python - **Version**: Python 3.8+ - **Dependencies**: `requests` for HTTP requests - **Features**: Simple, readable code with comprehensive error handling - **Best for**: Quick prototyping and data science workflows ### Java - **Version**: Java 8+ - **Build Tool**: Maven - **Dependencies**: Jackson for JSON processing, HttpURLConnection for HTTP requests - **Features**: Enterprise-grade code with proper package structure - **Best for**: Enterprise applications and microservices ### Node.js - **Version**: Node.js 14+ - **Dependencies**: Built-in `https` module - **Features**: Lightweight, async-first approach - **Best for**: Web applications and serverless functions ## 🔧 Configuration Before running any examples, you'll need: 1. **API Key**: Get your API key from [BrowserAct Integrations](https://www.browseract.com/reception/integrations) 2. **Workflow ID** (for Workflow API): Get your workflow ID from [Workflow List](https://www.browseract.com/reception/workflow-list) Update the configuration in each example file: - Replace `"app-abcdefghijklmn"` with your actual API key - Replace `1234567890` with your actual workflow ID ## 🔒 Security Best Practices **Important**: The examples use placeholder API keys for demonstration purposes. In production: 1. **Never hardcode API keys** in your source code 2. **Use environment variables** or secure configuration files 3. **Keep your API keys confidential** and rotate them regularly ### Environment Variable Examples ```python # Python import os authorization = os.getenv("BROWSERACT_API_KEY") ``` ```java // Java String authorization = System.getenv("BROWSERACT_API_KEY"); ``` ```javascript // Node.js const authorization = process.env.BROWSERACT_API_KEY; ``` ## 📖 Documentation - **API Documentation**: [BrowserAct API Docs](https://www.browseract.com/reception/integrations) - **Workflow API**: [Workflow API Reference](https://www.browseract.com/reception/integrations/api-workflow) ## 🤝 Support - **Discord Community**: [Join our Discord](https://discord.gg/UpnCKd7GaU) - **Email Support**: support@browseract.com - **GitHub Issues**: [Report bugs or request features](https://github.com/browser-act/browseract-api-examples/issues) ## 📄 License This demo code is provided as-is for educational and development purposes under the [MIT License](LICENSE). ## 🌟 Features - **Multi-language Support**: Python, Java, and Node.js implementations - **Complete API Coverage**: All BrowserAct Workflow API endpoints included - **Easy to Use**: Simple examples that can be run with minimal setup - **Scenario Examples**: Ready-to-use examples combining multiple APIs for common workflows - **Well Documented**: README files for each language with setup instructions --- **Ready to get started?** Choose your language above and dive into the examples! 🚀 Visit [BrowserAct](https://www.browseract.com/) to learn more about our AI-powered web scraping platform.