{
  "openapi": "3.0.1",
  "info": {
    "title": "US Franchise Registration & FDD Leads Scraper",
    "description": "Scrape US franchise registrations from official state regulators (MN & WI): franchisor, brands, status, effective/expiration dates, FDD documents, contact email & phone, multi-state footprint & lead score. Franchise-development B2B leads with filters + monitoring.",
    "version": "0.1",
    "x-build-id": "24SIpHHtpuvUDtYgE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~us-franchise-registrations-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-us-franchise-registrations-scraper",
        "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/scrapesage~us-franchise-registrations-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-us-franchise-registrations-scraper",
        "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/scrapesage~us-franchise-registrations-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-us-franchise-registrations-scraper",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Official state franchise regulators to query. MN = Minnesota Commerce CARDS (FDD documents). WI = Wisconsin DFI (contact email/phone + multi-state footprint). More states are being added.",
            "items": {
              "type": "string",
              "enum": [
                "MN",
                "WI"
              ],
              "enumTitles": [
                "Minnesota (Commerce CARDS)",
                "Wisconsin (DFI)"
              ]
            },
            "default": [
              "MN",
              "WI"
            ]
          },
          "franchisorName": {
            "title": "Franchisor name (search)",
            "type": "string",
            "description": "Search a specific franchisor / company name (matches legal or trade name) across the selected states. Leave blank to browse all registrations."
          },
          "brandName": {
            "title": "Brand / franchise name (filter)",
            "type": "string",
            "description": "Filter to a brand / franchise trade name (substring, case-insensitive)."
          },
          "filingYearFrom": {
            "title": "Filing year from",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest registration / filing year to include (Minnesota). Defaults to the current year when browsing; set lower to pull historical registrations."
          },
          "filingYearTo": {
            "title": "Filing year to",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest registration / filing year to include (Minnesota). Defaults to the current year."
          },
          "mnDocumentType": {
            "title": "Minnesota document type (filter)",
            "type": "string",
            "description": "Optional Minnesota document-type filter, e.g. 'Clean FDD', 'Order of Registration', 'Order of Renewed Registration', 'Order of Cancellation'. Leave blank for all."
          },
          "statusFilter": {
            "title": "Registration status filter",
            "type": "array",
            "description": "Keep only these registration statuses (e.g. Registered, On file, Expired, Withdrawn, Cancelled). Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active registrations only",
            "type": "boolean",
            "description": "Keep only franchisors with a currently-active registration (Registered / on file and not expired).",
            "default": false
          },
          "newRegistrationsOnly": {
            "title": "New registrations only",
            "type": "boolean",
            "description": "Keep only franchisors registered / renewed within the window below — the freshest expansion-intent leads.",
            "default": false
          },
          "registeredWithinDays": {
            "title": "Registered within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Window used by 'New registrations only'.",
            "default": 365
          },
          "expiringWithinDays": {
            "title": "Expiring within (days)",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "Keep only registrations expiring within this many days — perfect timing for renewal / re-engagement outreach (Wisconsin)."
          },
          "hasContactInfo": {
            "title": "Only records with contact email or phone",
            "type": "boolean",
            "description": "Keep only franchisors with a contact email or phone (requires Wisconsin contact-detail enrichment).",
            "default": false
          },
          "fetchContactDetails": {
            "title": "Fetch contact details (Wisconsin)",
            "type": "boolean",
            "description": "Enrich Wisconsin records with the detail page: business address, contact name + email + phone + fax, organization type and multi-state footprint. One extra request per emitted Wisconsin franchisor.",
            "default": true
          },
          "consolidateByFranchisor": {
            "title": "Consolidate by franchisor",
            "type": "boolean",
            "description": "Output one record per franchisor, merging its registrations across states (recommended). Turn off for one record per franchisor per state.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of franchisor records to emit.",
            "default": 500
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "leadScore"
            ],
            "type": "string",
            "description": "Order results by newest registration date or by lead score.",
            "default": "newest"
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Remove duplicate franchisor records within a run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new since last run)",
            "type": "boolean",
            "description": "Emit only franchisors not seen on previous runs with the same monitor key. Ideal with Apify Schedules to capture only newly registered / renewed franchisors. State is stored separately from Apify's scheduler so the two do not conflict.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitor-mode memory. Use distinct keys for distinct saved searches.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The state portals are reachable directly from Apify; a proxy is not required. Enable only if you want to route traffic through Apify Proxy.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}