{
  "openapi": "3.0.1",
  "info": {
    "title": "Sba Finder",
    "description": "This actor calls the official SBA Small Business website and saves the returned businesses to the default dataset.",
    "version": "0.0",
    "x-build-id": "VjuMTpzFTWtWbTCEm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/obicodes~sba-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-obicodes-sba-finder",
        "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/obicodes~sba-finder/runs": {
      "post": {
        "operationId": "runs-sync-obicodes-sba-finder",
        "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/obicodes~sba-finder/run-sync": {
      "post": {
        "operationId": "run-sync-obicodes-sba-finder",
        "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": {
          "searchTerm": {
            "title": "Search Term (Keyword, Business Name, UEI, or CAGE Code)",
            "type": "string",
            "description": "Single search query across business name, capabilities, UEI, CAGE code, or keywords (e.g. 'cybersecurity', 'car repair', 'construction').",
            "default": ""
          },
          "searchTerms": {
            "title": "Bulk Search Terms / UEIs / CAGE Codes (Optional Batch List)",
            "type": "array",
            "description": "Run multiple searches in a single batch! Enter a list of keywords, company names, 12-character UEIs, or 5-character CAGE codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US States or Territories",
            "type": "array",
            "description": "Two-letter US state or territory codes (e.g. ['FL', 'TX', 'CA', 'VA']).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP Codes (Optional)",
            "type": "array",
            "description": "Filter businesses by 5-digit US ZIP codes (e.g. ['33614', '20190']).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS Codes (Optional)",
            "type": "array",
            "description": "Filter by 6-digit NAICS industry codes (e.g. ['541511', '236220', '541611']).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "primaryNaicsOnly": {
            "title": "Match Primary NAICS Code Only",
            "type": "boolean",
            "description": "When enabled, only returns businesses where the specified NAICS code is their primary NAICS.",
            "default": false
          },
          "sbaCertifications": {
            "title": "SBA Certifications (8(a), HUBZone, WOSB, EDWOSB, VOSB, SDVOSB)",
            "type": "array",
            "description": "Filter by active official SBA certifications. Allowed values: '8a', 'HUBZone', 'WOSB', 'EDWOSB', 'VOSB', 'SDVOSB'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activeSamOnly": {
            "title": "Active SAM.gov Registration Only",
            "type": "boolean",
            "description": "When enabled, only returns businesses with an active SAM.gov registration (`samExtractCode = 'A'`).",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only Businesses With Email Address",
            "type": "boolean",
            "description": "When enabled, skips records without a direct contact email address.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only Businesses With Phone Number",
            "type": "boolean",
            "description": "When enabled, skips records without a direct contact phone number.",
            "default": false
          },
          "lastUpdated": {
            "title": "Profile Last Updated",
            "enum": [
              "anytime",
              "past-3-months",
              "past-6-months",
              "past-year",
              "custom"
            ],
            "type": "string",
            "description": "Filter by when the SBA business profile was last updated.",
            "default": "past-year"
          },
          "customDateRange": {
            "title": "Custom Updated Date Range",
            "type": "object",
            "description": "Only used when lastUpdated = 'custom'. Dates in YYYY-MM-DD format.",
            "properties": {
              "from": {
                "title": "From",
                "type": "string",
                "description": "Start date (YYYY-MM-DD)."
              },
              "to": {
                "title": "To",
                "type": "string",
                "description": "End date (YYYY-MM-DD)."
              }
            }
          },
          "maxItems": {
            "title": "Maximum Results (Per Search or Total)",
            "minimum": 0,
            "type": "integer",
            "description": "Limit the number of businesses saved per search query (set to 0 to return all matching businesses).",
            "default": 20
          },
          "includeRaw": {
            "title": "Include Raw API Object",
            "type": "boolean",
            "description": "When enabled, attaches the full unmodified `raw` record returned by the SBA API.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}