{
  "openapi": "3.0.1",
  "info": {
    "title": "SmartFetch — B2B Lead & Tech Intel, Site Map, Web Reader & MCP",
    "description": "Bulk B2B Lead & Tech-Stack Enrichment (bulk_inspect: up to 50 domains -> CSV/Excel-ready emails, socials, tech stack, HSTS/CSP), Website URL Mapping (map via sitemaps & links), Headless Chromium Screenshots (screenshot), PDF/Markdown Retrieval (fetch/batch_fetch) & Standby MCP Server (/mcp).",
    "version": "0.0",
    "x-build-id": "PekfpzFBQEwj15dpS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smartfetch.dev~smartfetch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smartfetch.dev-smartfetch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/smartfetch.dev~smartfetch/runs": {
      "post": {
        "operationId": "runs-sync-smartfetch.dev-smartfetch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/smartfetch.dev~smartfetch/run-sync": {
      "post": {
        "operationId": "run-sync-smartfetch.dev-smartfetch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "action": {
            "title": "Action",
            "enum": [
              "fetch",
              "screenshot",
              "inspect",
              "batch_fetch",
              "bulk_inspect",
              "map",
              "search_leads"
            ],
            "type": "string",
            "description": "Operation to perform: fetch (Markdown/text extraction), screenshot (headless Chromium image), inspect (structured SEO & site intelligence), batch_fetch (parallel multi-URL retrieval), bulk_inspect (B2B Lead & Tech-Stack Enrichment across up to 50 domains), or map (discover internal URLs from sitemaps & links).",
            "default": "fetch"
          },
          "url": {
            "title": "Target URL",
            "type": "string",
            "description": "Public HTTP/HTTPS webpage or PDF URL (used for fetch, screenshot, inspect, and map).",
            "default": "https://example.com"
          },
          "urls": {
            "title": "Batch / Bulk Target URLs or Domains",
            "type": "array",
            "description": "List of public URLs or bare domains (e.g. stripe.com) for batch_fetch (up to 5 URLs) or bulk_inspect (up to 50 domains for paying users, 5 on the Free plan).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Map URL Search Filter",
            "type": "string",
            "description": "Optional case-insensitive substring filter when action is 'map' (e.g. 'docs' or 'pricing').",
            "default": ""
          },
          "include_subdomains": {
            "title": "Include Subdomains (Map)",
            "type": "boolean",
            "description": "Include URLs on subdomains of the target domain when action is 'map'.",
            "default": false
          },
          "max_urls": {
            "title": "Maximum Mapped URLs",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of URLs to return when action is 'map' (1-500).",
            "default": 200
          },
          "query": {
            "title": "Lead Search Query",
            "type": "string",
            "description": "Business or niche search query when action is 'search_leads' (e.g. 'dental clinics austin tx').",
            "default": ""
          },
          "lead_source": {
            "title": "Lead Source",
            "enum": [
              "maps",
              "web"
            ],
            "type": "string",
            "description": "Lead discovery source when action is 'search_leads': 'maps' (Google Places) or 'web'.",
            "default": "maps"
          },
          "max_leads": {
            "title": "Maximum Enriched Leads",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum number of leads to enrich when action is 'search_leads' (up to 25 paying, 5 free).",
            "default": 5
          },
          "max_chars": {
            "title": "Maximum Characters",
            "minimum": 1000,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum character length returned for extracted Markdown and plain text.",
            "default": 20000
          },
          "render_mode": {
            "title": "Render Mode",
            "enum": [
              "auto",
              "http_only",
              "browser"
            ],
            "type": "string",
            "description": "Rendering strategy: 'auto' (fast HTTP with automatic headless Chromium escalation on SPA shells), 'http_only', or 'browser'.",
            "default": "auto"
          },
          "viewport": {
            "title": "Screenshot Viewport",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Viewport preset for screenshots: 'desktop' (1280x800) or 'mobile' (390x844).",
            "default": "desktop"
          },
          "full_page": {
            "title": "Full Page Screenshot",
            "type": "boolean",
            "description": "Capture the full scrollable page height (up to 4000px).",
            "default": false
          },
          "image_format": {
            "title": "Screenshot Image Format",
            "enum": [
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "Output image format for screenshots ('jpeg' or 'png').",
            "default": "jpeg"
          },
          "no_cache": {
            "title": "Bypass Cache",
            "type": "boolean",
            "description": "Bypass in-memory response caching.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}