API Reference

Complete reference documentation for the AllBeAPI REST API. All endpoints return JSON responses and support both GET and POST methods where applicable.

Base URL: https://res.allbeapi.top
Content-Type: application/json
Rate Limit: 1000 requests/hour

Overview

The AllBeAPI provides a unified REST interface to access multiple popular libraries. All endpoints follow RESTful conventions and return consistent JSON responses.

Request Format

POST /library-name/endpoint
Content-Type: application/json

{
  "parameter1": "value1",
  "parameter2": "value2"
}

Response Format

{
  "success": true,
  "data": {
    "result": "processed output"
  },
  "metadata": {
    "processing_time": 0.125,
    "library_version": "1.0.0"
  }
}

Error Response Format

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input parameters",
    "details": {
      "field": "markdown",
      "reason": "Required field missing"
    }
  }
}

Authentication

AllBeAPI is currently free to use without authentication. For production use or higher rate limits, you can obtain an API key.

Using API Keys (Optional)

POST /marked/render
Authorization: Bearer your-api-key-here
Content-Type: application/json

{
  "markdown": "# Hello World"
}

Text Processing

📝 Markdown Processing (Marked.js)

Convert Markdown text to HTML using the popular Marked.js library.

POST
/marked/render

Parameters

Parameter Type Required Description
markdown string Yes The Markdown text to convert
options object No Marked.js options (breaks, gfm, etc.)

Example Request

curl -X POST https://res.allbeapi.top/marked/render \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Hello World\n\nThis is **bold** text with a [link](https://example.com).",
    "options": {
      "breaks": true,
      "gfm": true
    }
  }'

Example Response

{
  "success": true,
  "data": {
    "html": "<h1>Hello World</h1>\n<p>This is <strong>bold</strong> text with a <a href=\"https://example.com\">link</a>.</p>"
  },
  "metadata": {
    "processing_time": 0.045,
    "library_version": "[email protected]"
  }
}

🔍 HTML Parsing (BeautifulSoup)

Parse HTML and extract data using CSS selectors or XPath expressions.

POST
/beautifulsoup/parse

Parameters

Parameter Type Required Description
html string Yes The HTML content to parse
selector string No CSS selector to extract specific elements
action string No Action to perform: "find", "find_all", "get_text"

Example Request

curl -X POST https://res.allbeapi.top/beautifulsoup/parse \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<div class=\"content\"><h1>Title</h1><p>Content here</p></div>",
    "selector": "h1",
    "action": "get_text"
  }'

Example Response

{
  "success": true,
  "data": {
    "result": ["Title"],
    "count": 1
  }
}

🛡️ HTML Sanitization

Clean HTML content to prevent XSS attacks and ensure content safety.

POST
/sanitize-html/clean

Parameters

Parameter Type Required Description
html string Yes The HTML content to sanitize
allowedTags array No List of allowed HTML tags
allowedAttributes object No Allowed attributes per tag

Example Request

curl -X POST https://res.allbeapi.top/sanitize-html/clean \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<p>Safe content</p><script>alert(\"xss\")</script>",
    "allowedTags": ["p", "strong", "em"],
    "allowedAttributes": {}
  }'

Code Tools

✨ Code Formatting (Prettier)

Format code using Prettier with support for multiple languages and configurations.

POST
/prettier/format

Parameters

Parameter Type Required Description
code string Yes The code to format
parser string Yes Parser: "babel", "typescript", "css", "html", "json", "markdown"
options object No Prettier formatting options

Example Request

curl -X POST https://res.allbeapi.top/prettier/format \
  -H "Content-Type: application/json" \
  -d '{
    "code": "const x=1;function test(){return x;}",
    "parser": "babel",
    "options": {
      "semi": true,
      "singleQuote": true,
      "tabWidth": 2
    }
  }'

Example Response

{
  "success": true,
  "data": {
    "formatted": "const x = 1;\nfunction test() {\n  return x;\n}\n"
  }
}

🔧 Code Linting (ESLint)

Analyze JavaScript and TypeScript code for errors and code quality issues.

POST
/eslint/analyze

Parameters

Parameter Type Required Description
code string Yes The JavaScript/TypeScript code to analyze
config object No ESLint configuration options
filename string No Filename for context (affects rules)

Example Request

curl -X POST https://res.allbeapi.top/eslint/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "code": "var x = 1; console.log(x)",
    "config": {
      "rules": {
        "no-console": "warn",
        "prefer-const": "error"
      }
    }
  }'

Data Processing

✅ JSON Schema Validation (AJV)

Validate JSON data against JSON Schema using the fastest validator available.

POST
/ajv/validate

Parameters

Parameter Type Required Description
schema object Yes JSON Schema definition
data any Yes Data to validate against the schema

Example Request

curl -X POST https://res.allbeapi.top/ajv/validate \
  -H "Content-Type: application/json" \
  -d '{
    "schema": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "age": {"type": "number", "minimum": 0}
      },
      "required": ["name"]
    },
    "data": {
      "name": "John Doe",
      "age": 30
    }
  }'

Example Response

{
  "success": true,
  "data": {
    "valid": true,
    "errors": []
  }
}

Media Generation

📱 QR Code Generation

Generate QR codes with customizable options and formats.

POST
/python-qrcode/generate-qrcode

Parameters

Parameter Type Required Description
data string Yes Data to encode in the QR code
size number No Size of the QR code (default: 10)
border number No Border size (default: 4)
error_correction string No Error correction level: "L", "M", "Q", "H"

Example Request

curl -X POST https://res.allbeapi.top/python-qrcode/generate-qrcode \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://allbeapi.com",
    "size": 10,
    "border": 4,
    "error_correction": "M"
  }' \
  --output qrcode.png
Note: This endpoint returns a binary PNG image. The response Content-Type will be image/png.

Error Codes

AllBeAPI uses standard HTTP status codes and custom error codes for specific situations.

HTTP Status Codes

Status Code Meaning Description
200 Success Request processed successfully
400 Bad Request Invalid request parameters or format
401 Unauthorized Invalid or missing API key
429 Rate Limit Exceeded Too many requests in the given time period
500 Internal Server Error Server error during processing
503 Service Unavailable Service temporarily unavailable

Custom Error Codes

Error Code Description Resolution
VALIDATION_ERROR Request validation failed Check required parameters and data types
PROCESSING_ERROR Error during content processing Verify input data format and content
LIBRARY_ERROR Underlying library error Check input compatibility with the specific library
RATE_LIMIT_EXCEEDED Rate limit exceeded Wait before making more requests or upgrade plan
CONTENT_TOO_LARGE Input content exceeds size limits Reduce content size or split into smaller chunks

Example Error Response

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Missing required parameter 'markdown'",
    "details": {
      "parameter": "markdown",
      "type": "string",
      "required": true
    }
  },
  "request_id": "req_123456789"
}