{
  "openapi": "3.0.3",
  "info": {
    "title": "ProWebLook API",
    "description": "ProWebLook provides APIs for WhatsApp number verification, phone number validation, email verification, caller identification, IP geolocation, and social media scraping. All endpoints require an API key passed as a query parameter.",
    "version": "1.0.0",
    "contact": {
      "name": "ProWebLook Support",
      "url": "https://proweblook.com/contact",
      "email": "support@proweblook.com"
    },
    "termsOfService": "https://proweblook.com/generic/terms_conditions",
    "x-logo": {
      "url": "https://proweblook.com/upload/logo.png"
    }
  },
  "servers": [
    {
      "url": "https://proweblook.com/api/v1",
      "description": "Production server"
    }
  ],
  "externalDocs": {
    "description": "ProWebLook Documentation",
    "url": "https://proweblook.gitbook.io/proweblook-help-desk/"
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "Your ProWebLook API key. Get a free key at https://proweblook.com/auth/signup"
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "string",
            "example": "Invalid API key"
          }
        }
      },
      "StatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "The system is running"
          }
        }
      },
      "WhatsAppCheckResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "number": {
            "type": "string",
            "example": "+1234567890"
          },
          "whatsapp": {
            "type": "boolean",
            "description": "Whether the number is registered on WhatsApp",
            "example": true
          }
        }
      },
      "PhoneValidationResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "number": {
            "type": "string",
            "example": "+1234567890"
          },
          "valid": {
            "type": "boolean",
            "example": true
          },
          "country": {
            "type": "string",
            "example": "US"
          },
          "carrier": {
            "type": "string",
            "example": "T-Mobile"
          },
          "line_type": {
            "type": "string",
            "enum": ["mobile", "landline", "voip", "unknown"],
            "example": "mobile"
          }
        }
      },
      "EmailCheckResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "email": {
            "type": "string",
            "example": "user@example.com"
          },
          "valid": {
            "type": "boolean",
            "example": true
          },
          "disposable": {
            "type": "boolean",
            "example": false
          },
          "mx_found": {
            "type": "boolean",
            "example": true
          },
          "smtp_check": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "GeoIPResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "ip": {
            "type": "string",
            "example": "8.8.8.8"
          },
          "country": {
            "type": "string",
            "example": "United States"
          },
          "region": {
            "type": "string",
            "example": "California"
          },
          "city": {
            "type": "string",
            "example": "Mountain View"
          },
          "latitude": {
            "type": "number",
            "example": 37.386
          },
          "longitude": {
            "type": "number",
            "example": -122.0838
          },
          "timezone": {
            "type": "string",
            "example": "America/Los_Angeles"
          },
          "isp": {
            "type": "string",
            "example": "Google LLC"
          }
        }
      },
      "CallerInfoResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "number": {
            "type": "string",
            "example": "+1234567890"
          },
          "name": {
            "type": "string",
            "example": "John Doe"
          },
          "carrier": {
            "type": "string",
            "example": "AT&T"
          },
          "line_type": {
            "type": "string",
            "example": "mobile"
          },
          "location": {
            "type": "string",
            "example": "New York, NY"
          }
        }
      },
      "BalanceResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "example": true
          },
          "wa_balance": {
            "type": "integer",
            "description": "WhatsApp API credits remaining"
          },
          "email_balance": {
            "type": "integer",
            "description": "Email API credits remaining"
          },
          "geoip_balance": {
            "type": "integer",
            "description": "GeoIP API credits remaining"
          },
          "phone_balance": {
            "type": "integer",
            "description": "Phone API credits remaining"
          }
        }
      },
      "AuditRunRequest": {
        "type": "object",
        "required": ["brand_name", "brand_url"],
        "properties": {
          "brand_name": {
            "type": "string",
            "description": "The brand name to audit",
            "example": "ProWebLook"
          },
          "brand_url": {
            "type": "string",
            "description": "The brand website URL",
            "example": "https://proweblook.com"
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of competitor brand names to compare against"
          }
        }
      }
    }
  },
  "paths": {
    "/status": {
      "get": {
        "summary": "Check API Status",
        "description": "Check if the ProWebLook API system is running. No authentication required.",
        "operationId": "getStatus",
        "tags": ["System"],
        "security": [],
        "responses": {
          "200": {
            "description": "System status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/checkwanumber": {
      "get": {
        "summary": "Verify WhatsApp Number",
        "description": "Check if a phone number is registered on WhatsApp in real-time. Does not send any message or OTP to the target number. Returns WhatsApp presence status with 99.7% accuracy across 180+ countries. This is ProWebLook's flagship API.",
        "operationId": "checkWhatsAppNumber",
        "tags": ["WhatsApp"],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "description": "Phone number with country code (e.g., +1234567890)",
            "schema": {
              "type": "string",
              "example": "+1234567890"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "WhatsApp verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppCheckResponse"
                }
              }
            }
          }
        }
      }
    },
    "/checkapi": {
      "get": {
        "summary": "Validate Phone Number",
        "description": "Validate any phone number globally. Returns carrier name, line type (mobile/landline/VoIP), country, and formatting details.",
        "operationId": "validatePhoneNumber",
        "tags": ["Phone"],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "description": "Phone number with country code",
            "schema": {
              "type": "string",
              "example": "+1234567890"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Phone validation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneValidationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/check": {
      "get": {
        "summary": "Caller ID Lookup",
        "description": "Reverse phone lookup to identify caller names, carrier, location, and line type for any phone number.",
        "operationId": "callerIdLookup",
        "tags": ["Phone"],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "description": "Phone number with country code",
            "schema": {
              "type": "string",
              "example": "+1234567890"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Caller information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallerInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/checkemail": {
      "get": {
        "summary": "Verify Email Address",
        "description": "Verify an email address in real time without sending any email. Checks syntax, domain MX records, SMTP validation, and detects disposable/temporary email addresses.",
        "operationId": "verifyEmail",
        "tags": ["Email"],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "Email address to verify",
            "schema": {
              "type": "string",
              "format": "email",
              "example": "user@example.com"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailCheckResponse"
                }
              }
            }
          }
        }
      }
    },
    "/checkgeoip": {
      "get": {
        "summary": "IP Geolocation Lookup",
        "description": "Geolocate any IP address worldwide. Returns country, region, city, coordinates, timezone, ISP, and organization details.",
        "operationId": "geolocateIP",
        "tags": ["IP"],
        "parameters": [
          {
            "name": "ip",
            "in": "query",
            "required": true,
            "description": "IPv4 or IPv6 address to geolocate",
            "schema": {
              "type": "string",
              "example": "8.8.8.8"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Geolocation data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoIPResponse"
                }
              }
            }
          }
        }
      }
    },
    "/checkbalance": {
      "get": {
        "summary": "Check Account Balance",
        "description": "Check your remaining API credits for each service (WhatsApp, Email, GeoIP, Phone).",
        "operationId": "checkBalance",
        "tags": ["Account"],
        "responses": {
          "200": {
            "description": "Account balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sendwasms": {
      "get": {
        "summary": "Send WhatsApp Message",
        "description": "Send a WhatsApp message programmatically. Supports text, images, documents, and media files up to 2MB.",
        "operationId": "sendWhatsAppMessage",
        "tags": ["WhatsApp"],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "description": "Recipient phone number with country code",
            "schema": {
              "type": "string",
              "example": "+1234567890"
            }
          },
          {
            "name": "message",
            "in": "query",
            "required": true,
            "description": "Message text to send",
            "schema": {
              "type": "string",
              "example": "Hello from ProWebLook!"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Message send result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/scrapersearch": {
      "get": {
        "summary": "Search Reddit",
        "description": "Search Reddit for posts and subreddits matching a query. Returns post titles, content, upvotes, comments count, and subreddit information.",
        "operationId": "searchReddit",
        "tags": ["Scraping"],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Search query term",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reddit search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/scraperpost": {
      "get": {
        "summary": "Scrape Reddit Post",
        "description": "Extract full content and comments from a specific Reddit post URL.",
        "operationId": "scrapeRedditPost",
        "tags": ["Scraping"],
        "parameters": [
          {
            "name": "post_url",
            "in": "query",
            "required": true,
            "description": "Full Reddit post URL",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reddit post data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/scraperxsearch": {
      "get": {
        "summary": "Search X (Twitter)",
        "description": "Search X (formerly Twitter) for posts matching a query. Returns tweets, engagement metrics, and user information.",
        "operationId": "searchTwitter",
        "tags": ["Scraping"],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Search query term",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "X/Twitter search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/scraperxpost": {
      "get": {
        "summary": "Scrape X (Twitter) Post",
        "description": "Extract full content and metrics from a specific X/Twitter post.",
        "operationId": "scrapeTwitterPost",
        "tags": ["Scraping"],
        "parameters": [
          {
            "name": "post_url",
            "in": "query",
            "required": true,
            "description": "Full X/Twitter post URL",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "X/Twitter post data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/scraperxcomment": {
      "get": {
        "summary": "Scrape X (Twitter) Comments",
        "description": "Extract comments/replies from a specific X/Twitter post.",
        "operationId": "scrapeTwitterComments",
        "tags": ["Scraping"],
        "parameters": [
          {
            "name": "post_url",
            "in": "query",
            "required": true,
            "description": "Full X/Twitter post URL",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "X/Twitter comments data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/audit_run": {
      "post": {
        "summary": "Run AI Visibility Audit",
        "description": "Run a brand visibility audit across major AI/LLM platforms (ChatGPT, Claude, Gemini, Perplexity). Analyzes how AI models perceive and recommend your brand.",
        "operationId": "runAudit",
        "tags": ["AI Audit"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditRunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audit initiated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "audit_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/audit": {
      "get": {
        "summary": "Get Audit Results",
        "description": "Retrieve results of a previously run AI visibility audit.",
        "operationId": "getAudit",
        "tags": ["AI Audit"],
        "parameters": [
          {
            "name": "audit_id",
            "in": "query",
            "required": true,
            "description": "Audit ID from audit_run response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/audit_summary": {
      "get": {
        "summary": "Get Audit Summary",
        "description": "Get a summary overview of AI visibility audit results.",
        "operationId": "getAuditSummary",
        "tags": ["AI Audit"],
        "parameters": [
          {
            "name": "audit_id",
            "in": "query",
            "required": true,
            "description": "Audit ID from audit_run response",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "System",
      "description": "System health and status"
    },
    {
      "name": "WhatsApp",
      "description": "WhatsApp number verification and messaging APIs"
    },
    {
      "name": "Phone",
      "description": "Phone number validation and caller identification"
    },
    {
      "name": "Email",
      "description": "Email address verification"
    },
    {
      "name": "IP",
      "description": "IP address geolocation"
    },
    {
      "name": "Account",
      "description": "Account management and balance"
    },
    {
      "name": "Scraping",
      "description": "Social media scraping (Reddit, X/Twitter)"
    },
    {
      "name": "AI Audit",
      "description": "AI/LLM brand visibility auditing"
    }
  ]
}
