{"openapi": "3.0.3", "info": {"title": "Waltsoft WebPulse Web Content Extraction and Search API", "description": "Clean web content extraction and intelligent search for AI agents. Extract structured markdown from any URL or run DuckDuckGo web searches in a single API call. Ideal for RAG pipelines, research agents, and content summarization workflows.\n", "version": "1.0.0"}, "servers": [{"url": "https://webpulse.waltsoft.net", "description": "WebPulse production endpoint"}], "paths": {"/extract": {"post": {"summary": "Extract clean markdown from a URL", "description": "Fetches the given URL, strips navigation, ads, and boilerplate, and returns clean markdown-formatted content suitable for LLM ingestion. Returns the page title, meta description, word count, and a flag indicating whether the result was served from cache.\n", "operationId": "extractUrl", "tags": ["Extraction"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["url"], "properties": {"url": {"type": "string", "format": "uri", "description": "The fully-qualified URL to extract content from", "example": "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"}}}}}}, "responses": {"200": {"description": "Content successfully extracted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExtractResponse"}}}}, "400": {"description": "Bad request - missing or invalid URL", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "401": {"description": "Unauthorized - invalid or missing API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "422": {"description": "Unprocessable - URL is reachable but content cannot be extracted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "429": {"description": "Rate limit exceeded", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "500": {"description": "Internal server error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}}}}, "/search": {"post": {"summary": "Web search via DuckDuckGo", "description": "Runs a DuckDuckGo web search for the given query and returns structured results with title, URL, and snippet for each result. Use for real-time research, fact-checking, and knowledge augmentation in AI agent pipelines.\n", "operationId": "searchWeb", "tags": ["Search"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["query"], "properties": {"query": {"type": "string", "description": "Search query string", "example": "AWS Lambda pricing 2024"}, "count": {"type": "integer", "description": "Number of results to return (default 10, max 50)", "default": 10, "minimum": 1, "maximum": 50, "example": 10}}}}}}, "responses": {"200": {"description": "Search results returned", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SearchResponse"}}}}, "400": {"description": "Bad request - missing or invalid query", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "401": {"description": "Unauthorized - invalid or missing API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "429": {"description": "Rate limit exceeded", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "500": {"description": "Internal server error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}}}}}, "components": {"schemas": {"ExtractResponse": {"type": "object", "properties": {"url": {"type": "string", "format": "uri", "description": "The URL that was extracted", "example": "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"}, "title": {"type": "string", "description": "Page title", "example": "What is AWS Lambda? - AWS Lambda"}, "description": {"type": "string", "description": "Meta description of the page", "example": "AWS Lambda is a serverless compute service that runs your code in response to events."}, "content": {"type": "string", "description": "Clean markdown-formatted page content", "example": "# What is AWS Lambda?\n\nAWS Lambda is a serverless compute service..."}, "word_count": {"type": "integer", "description": "Word count of the extracted content", "example": 842}, "cached": {"type": "boolean", "description": "Whether this result was served from cache", "example": false}}}, "SearchResult": {"type": "object", "properties": {"title": {"type": "string", "description": "Result page title", "example": "AWS Lambda Pricing - Amazon Web Services"}, "url": {"type": "string", "format": "uri", "description": "Result URL", "example": "https://aws.amazon.com/lambda/pricing/"}, "snippet": {"type": "string", "description": "Short text excerpt from the result", "example": "With AWS Lambda, you pay only for what you use. You are charged based on the number of requests..."}}}, "SearchResponse": {"type": "object", "properties": {"query": {"type": "string", "description": "The original search query", "example": "AWS Lambda pricing 2024"}, "results": {"type": "array", "description": "Ordered list of search results", "items": {"$ref": "#/components/schemas/SearchResult"}}, "total": {"type": "integer", "description": "Total number of results returned", "example": 10}}}, "ErrorResponse": {"type": "object", "properties": {"error": {"type": "string", "description": "Machine-readable error code", "example": "invalid_url"}, "message": {"type": "string", "description": "Human-readable error description", "example": "The provided URL is not a valid HTTP or HTTPS URL"}}}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "X-API-Key", "description": "API key delivered via AWS Secrets Manager on Marketplace subscription"}}}, "security": [{"ApiKeyAuth": []}]}
