REST API for Pro users to integrate bugX tools into their workflows
All API requests should be made to the following base URL:
https://bugx.in/api/v1
All API requests require an API key passed in the X-API-Key header.
X-API-Key: wot_your_api_key_here
Check HTTP status codes for multiple URLs.
| Parameter | Type | Description |
|---|---|---|
| urls required | array | Array of URLs to check (max 100) |
| concurrency | number | Concurrent requests (default: 5) |
curl -X POST https://bugx.in/api/v1/check-status \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com",
"https://google.com"
]
}'
{
"success": true,
"total": 2,
"working": 2,
"broken": 0,
"results": [
{
"url": "https://example.com",
"status": 200,
"ok": true,
"ms": 234
}
]
}
Measure page load times and get performance grades.
| Parameter | Type | Description |
|---|---|---|
| urls required | array | Array of URLs to test (max 50) |
| concurrency | number | Concurrent requests (default: 3) |
{
"success": true,
"total": 1,
"avgTtfb": 245,
"avgTotal": 892,
"grades": { "A": 0, "B": 1, "C": 0, "D": 0, "F": 0 },
"results": [
{
"url": "https://example.com",
"ttfb": 245,
"totalTime": 892,
"grade": "B"
}
]
}
Check SSL certificate validity and expiration.
| Parameter | Type | Description |
|---|---|---|
| domains required | array | Array of domains to check (max 50) |
{
"domains": ["example.com", "google.com"]
}
Analyze SEO meta tags and get optimization scores.
| Parameter | Type | Description |
|---|---|---|
| urls required | array | Array of URLs to analyze (max 20) |
Trace redirect chains and detect loops.
| Parameter | Type | Description |
|---|---|---|
| urls required | array | Array of URLs to check (max 50) |
Check security headers and get security grades.
| Parameter | Type | Description |
|---|---|---|
| urls required | array | Array of URLs to check (max 50) |
Look up DNS records for a domain including A, AAAA, MX, TXT, NS, CNAME, and SOA records.
| Parameter | Type | Description |
|---|---|---|
| domain required | string | Domain name to look up |
| types | array | Record types to query (default: ["A", "AAAA", "MX", "TXT", "NS", "CNAME"]) |
curl -X POST https://bugx.in/api/v1/dns-lookup \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"types": ["A", "MX", "TXT"]
}'
{
"success": true,
"domain": "example.com",
"records": {
"A": ["93.184.216.34"],
"MX": [{ "exchange": "mail.example.com", "priority": 10 }],
"TXT": ["v=spf1 -all"]
}
}
Get WHOIS registration information for a domain.
| Parameter | Type | Description |
|---|---|---|
| domain required | string | Domain name to look up |
curl -X POST https://bugx.in/api/v1/whois-lookup \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
{
"success": true,
"domain": "example.com",
"data": {
"domainName": "EXAMPLE.COM",
"registrar": "RESERVED-Internet Assigned Numbers Authority",
"creationDate": "1995-08-14T04:00:00Z",
"expirationDate": "2024-08-13T04:00:00Z",
"nameServers": ["A.IANA-SERVERS.NET", "B.IANA-SERVERS.NET"]
}
}
Check the status of image URLs to find broken images.
| Parameter | Type | Description |
|---|---|---|
| urls required | string | Newline or space-separated list of image URLs (max 100) |
| concurrency | number | Concurrent requests (default: 10) |
curl -X POST https://bugx.in/api/v1/check-images \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"urls": "https://example.com/img1.png\nhttps://example.com/img2.jpg"
}'
{
"success": true,
"total": 2,
"working": 1,
"broken": 1,
"results": [
{ "url": "https://example.com/img1.png", "status": 200, "ok": true },
{ "url": "https://example.com/img2.jpg", "status": 404, "ok": false }
]
}
Find all broken links on a web page.
| Parameter | Type | Description |
|---|---|---|
| pageUrl required | string | URL of the page to scan for broken links |
| checkExternal | boolean | Check external links too (default: true) |
| concurrency | number | Concurrent requests (default: 5) |
curl -X POST https://bugx.in/api/v1/broken-links \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{"pageUrl": "https://example.com"}'
{
"success": true,
"pageUrl": "https://example.com",
"total": 15,
"working": 14,
"broken": 1,
"results": [
{ "url": "https://example.com/broken", "status": 404, "ok": false, "text": "Broken Link" }
]
}
Test CORS configuration by sending a preflight OPTIONS request.
| Parameter | Type | Description |
|---|---|---|
| url required | string | URL to test CORS configuration |
| origin | string | Origin header to send (default: "https://example.com") |
| method | string | Method to request (default: "GET") |
curl -X POST https://bugx.in/api/v1/cors-test \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/data",
"origin": "https://myapp.com",
"method": "POST"
}'
{
"success": true,
"url": "https://api.example.com/data",
"origin": "https://myapp.com",
"method": "POST",
"statusCode": 204,
"corsEnabled": true,
"corsHeaders": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
}
}
Test if URLs are allowed or blocked by a site's robots.txt.
| Parameter | Type | Description |
|---|---|---|
| site required | string | Base URL of the site |
| urls required | array | Array of paths to test (max 50) |
| userAgent | string | User agent to test for (default: "*") |
curl -X POST https://bugx.in/api/v1/robots-test \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"site": "https://example.com",
"urls": ["/admin", "/public/page", "/private/data"],
"userAgent": "Googlebot"
}'
{
"success": true,
"site": "https://example.com",
"userAgent": "Googlebot",
"robotsTxtFound": true,
"results": [
{ "url": "/admin", "allowed": false, "matchedRule": "Disallow: /admin" },
{ "url": "/public/page", "allowed": true, "matchedRule": null },
{ "url": "/private/data", "allowed": false, "matchedRule": "Disallow: /private/" }
]
}
Validate an XML sitemap and extract its URLs.
| Parameter | Type | Description |
|---|---|---|
| url required | string | URL of the sitemap to validate |
curl -X POST https://bugx.in/api/v1/sitemap-validate \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/sitemap.xml"}'
{
"success": true,
"url": "https://example.com/sitemap.xml",
"valid": true,
"type": "urlset",
"totalUrls": 150,
"urls": [
{ "loc": "https://example.com/", "lastmod": "2024-01-15", "priority": 1.0 },
{ "loc": "https://example.com/about", "lastmod": "2024-01-10", "priority": 0.8 }
]
}
Execute multiple cURL commands in batch.
| Parameter | Type | Description |
|---|---|---|
| commands required | string | Newline-separated cURL commands (max 50) |
| concurrency | number | Concurrent requests (default: 5) |
curl -X POST https://bugx.in/api/v1/batch-curl \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"commands": "curl https://api.example.com/users\ncurl -X POST https://api.example.com/data -d \"test=1\""
}'
{
"success": true,
"total": 2,
"successful": 2,
"failed": 0,
"results": [
{ "command": "curl https://api.example.com/users", "status": 200, "success": true },
{ "command": "curl -X POST ...", "status": 201, "success": true }
]
}
Test multiple API endpoints with custom configurations.
| Parameter | Type | Description |
|---|---|---|
| endpoints required | array | Array of endpoint configs (max 20) |
| concurrency | number | Concurrent requests (default: 3) |
| Field | Type | Description |
|---|---|---|
| url | string | Endpoint URL |
| method | string | HTTP method (GET, POST, PUT, DELETE, etc.) |
| headers | object | Request headers |
| body | any | Request body |
| expectedStatus | number | Expected status code |
curl -X POST https://bugx.in/api/v1/api-tester \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"endpoints": [
{ "url": "https://api.example.com/users", "method": "GET", "expectedStatus": 200 },
{ "url": "https://api.example.com/health", "method": "GET", "expectedStatus": 200 }
]
}'
{
"success": true,
"total": 2,
"passed": 2,
"failed": 0,
"results": [
{ "url": "https://api.example.com/users", "status": 200, "passed": true, "ms": 145 },
{ "url": "https://api.example.com/health", "status": 200, "passed": true, "ms": 52 }
]
}
Compare stored procedures between two MySQL databases.
| Parameter | Type | Description |
|---|---|---|
| db1 required | object | First database connection config |
| db2 required | object | Second database connection config |
| Field | Type | Description |
|---|---|---|
| host | string | Database host |
| port | number | Database port (default: 3306) |
| user | string | Database username |
| password | string | Database password |
| database | string | Database name |
curl -X POST https://bugx.in/api/v1/db-proc-compare \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"db1": { "host": "dev.db.example.com", "user": "admin", "password": "***", "database": "myapp" },
"db2": { "host": "prod.db.example.com", "user": "admin", "password": "***", "database": "myapp" }
}'
{
"success": true,
"summary": { "total": 25, "identical": 20, "different": 3, "onlyInDb1": 1, "onlyInDb2": 1 },
"comparison": [
{ "name": "sp_get_users", "status": "identical" },
{ "name": "sp_update_order", "status": "different", "differences": ["Parameter count differs"] }
]
}
Compare table structures between two MySQL databases.
| Parameter | Type | Description |
|---|---|---|
| db1 required | object | First database connection config (same as db-proc-compare) |
| db2 required | object | Second database connection config |
curl -X POST https://bugx.in/api/v1/db-table-compare \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"db1": { "host": "dev.db.example.com", "user": "admin", "password": "***", "database": "myapp" },
"db2": { "host": "prod.db.example.com", "user": "admin", "password": "***", "database": "myapp" }
}'
{
"success": true,
"summary": { "total": 42, "identical": 38, "different": 2, "onlyInDb1": 1, "onlyInDb2": 1 },
"comparison": [
{ "name": "users", "status": "identical" },
{ "name": "orders", "status": "different", "differences": ["Column 'discount' type differs"] }
]
}
Generate SQL queries from natural language questions using AI.
| Parameter | Type | Description |
|---|---|---|
| question required | string | Natural language question about your data |
| db required | object | Database connection config (same as db-proc-compare) |
| execute | boolean | Execute the generated SQL (default: false) |
curl -X POST https://bugx.in/api/v1/text-to-sql \
-H "X-API-Key: wot_your_key" \
-H "Content-Type: application/json" \
-d '{
"question": "How many orders were placed last month?",
"db": { "host": "db.example.com", "user": "admin", "password": "***", "database": "myapp" },
"execute": true
}'
{
"success": true,
"question": "How many orders were placed last month?",
"sql": "SELECT COUNT(*) as order_count FROM orders WHERE created_at >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)",
"executed": true,
"data": [{ "order_count": 1547 }],
"rowCount": 1
}
Get your API usage statistics including today's usage, historical data, and plan details.
curl https://bugx.in/api/v1/usage \
-H "X-API-Key: wot_your_key"
{
"today": {
"used": 42,
"limit": null,
"remaining": null,
"byTool": {
"check-status": 15,
"ssl-checker": 12,
"page-speed": 10,
"seo-checker": 5
}
},
"history": [
{ "date": "2025-01-28", "count": 38 },
{ "date": "2025-01-27", "count": 56 }
],
"plan": "pro",
"isPro": true,
"isStarter": false
}
| Field | Type | Description |
|---|---|---|
| today.used | number | Number of API calls made today |
| today.limit | number | null | Daily limit (null for unlimited Pro users) |
| today.remaining | number | null | Remaining calls today (null for unlimited) |
| today.byTool | object | Breakdown of usage by tool name |
| history | array | Last 7 days of usage history |
| plan | string | Current plan: "free", "starter", or "pro" |
Pro users have unlimited API calls. However, each endpoint has limits on batch size:
Errors are returned with appropriate HTTP status codes:
400 - Bad Request (invalid parameters)401 - Unauthorized (missing or invalid API key)403 - Forbidden (not a Pro user)500 - Server Error{
"error": "Description of the error"
}