{
  "openapi": "3.0.1",
  "info": {
    "title": "E-rate Incumbent Provider & Contract Expiry Lookup",
    "description": "Who provides internet, WAN or voice to a school district or library, and when that E-rate contract expires. One row per FCC Form 471 funding request (FRN) from USAC Open Data: incumbent vendor, contract number, expiration date, bid count, discount rate and committed dollars. Look up by BEN, by…",
    "version": "0.1",
    "x-build-id": "cnKf0GI0Tt1LbWpEl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hamsmoothie~erate-incumbent-provider-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hamsmoothie-erate-incumbent-provider-lookup",
        "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/hamsmoothie~erate-incumbent-provider-lookup/runs": {
      "post": {
        "operationId": "runs-sync-hamsmoothie-erate-incumbent-provider-lookup",
        "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/hamsmoothie~erate-incumbent-provider-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-hamsmoothie-erate-incumbent-provider-lookup",
        "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": {
          "mode": {
            "title": "Lookup mode",
            "enum": [
              "ben",
              "name",
              "expiring"
            ],
            "type": "string",
            "description": "ben = every FRN for one Billed Entity Number. name = every FRN whose applicant name contains organization_name. expiring = every FRN in a state whose contract expires between expiring_after and expiring_before.",
            "default": "ben"
          },
          "ben": {
            "title": "BEN (Billed Entity Number)",
            "type": "string",
            "description": "USAC Billed Entity Number of the school district, school, library or consortium. Used in ben mode. Default 141146 = Midway ISD, TX.",
            "default": "141146"
          },
          "organization_name": {
            "title": "Applicant name contains",
            "type": "string",
            "description": "Case-insensitive substring of the applicant's organization name, e.g. 'Midway Indep School District' or 'Houston'. Used in name mode. If several BENs match, every FRN is returned and the BENs are listed in the SUMMARY row."
          },
          "state": {
            "title": "State (2 letters)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter state code, used in expiring mode.",
            "default": "TX"
          },
          "expiring_after": {
            "title": "Contract expires on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Start of the expiry window in expiring mode. Leave empty for today."
          },
          "expiring_before": {
            "title": "Contract expires before (YYYY-MM-DD)",
            "type": "string",
            "description": "End of the expiry window in expiring mode. Leave empty for one year from today."
          },
          "funding_years": {
            "title": "Funding years",
            "type": "array",
            "description": "Restrict to these E-rate funding years, e.g. 2025, 2026. Leave empty for all years (2016 onward).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "service_type": {
            "title": "Service type",
            "enum": [
              "",
              "Data Transmission and/or Internet Access",
              "Internal Connections",
              "Basic Maintenance of Internal Connections",
              "Managed Internal Broadband Services",
              "Voice Services"
            ],
            "type": "string",
            "description": "Restrict to one Form 471 service type. Leave empty for all.",
            "default": ""
          },
          "form_version": {
            "title": "Form version",
            "enum": [
              "current",
              "original",
              "all"
            ],
            "type": "string",
            "description": "USAC publishes two rows per FRN: Original (as filed) and Current (after corrections and commitment). Current gives one row per FRN. 'all' returns both.",
            "default": "current"
          },
          "include_line_items": {
            "title": "Add line-item detail (bandwidth, product)",
            "type": "boolean",
            "description": "Also query the Form 471 line-item dataset for each FRN and add download/upload speed, function, product and purpose columns. Slower (one extra request per FRN); off by default.",
            "default": false
          },
          "max_rows": {
            "title": "Max FRN rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many FRN rows (hard cap 5000). The free SUMMARY row is not counted.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}