{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Website Compliance Auditor — GSA Site Scanning API",
    "description": "Audit 29,000+ federal .gov websites via the GSA Site Scanning API. Per-agency compliance scorecards (USWDS, DAP, HTTPS/HSTS, IPv6, mobile, required links, Section 508), flat site exports and gap lists of sites missing a technology — with explicit coverage and per-scan status on every row.",
    "version": "1.1",
    "x-build-id": "8BRG18qI7XbB203kB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~gsa-site-scanning-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-gsa-site-scanning-auditor",
        "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/malonestar~gsa-site-scanning-auditor/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-gsa-site-scanning-auditor",
        "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/malonestar~gsa-site-scanning-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-gsa-site-scanning-auditor",
        "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": "Mode",
            "enum": [
              "scorecard",
              "sites",
              "gaps"
            ],
            "type": "string",
            "description": "What to output. 'scorecard' (default) = one row per agency with % compliant per pillar + composite 0-100 compliance score + worst offender domains. 'sites' = one flat row per website (filterable). 'gaps' = one row per site FAILING the chosen pillar — a ready-made govtech prospect list.",
            "default": "scorecard"
          },
          "apiKey": {
            "title": "api.data.gov API key",
            "type": "string",
            "description": "Your free api.data.gov key (register in 30 seconds at https://api.data.gov/signup/ — 1,000 requests/hour). The shared DEMO_KEY is capped at just 10 requests/hour across ALL anonymous users, which is one page-and-a-bit of results; it is kept as the prefill only so the example runs. If the API cannot be reached the run FAILS loudly rather than emitting a partial answer that looks complete."
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Optional list of federal agency names to audit, e.g. [\"General Services Administration\", \"Department of the Interior\"]. GSA's filter is EXACT and case-sensitive, so the actor first resolves what you type against the live list of 146 agency names — common abbreviations (GSA, NASA, EPA, HHS, DOE, VA), different casing and unique partial names all resolve. A name that still cannot be resolved produces an explicit no_match row naming the closest candidates, never a silently empty result. Leave empty to sweep all agencies.",
            "items": {
              "type": "string"
            }
          },
          "pillar": {
            "title": "Gap pillar (gaps mode)",
            "enum": [
              "dap",
              "uswds",
              "https_enforced",
              "hsts",
              "ipv6",
              "viewport_meta_tag",
              "sitemap_xml",
              "robots_txt"
            ],
            "type": "string",
            "description": "Which compliance pillar to prospect on in 'gaps' mode: every output row is a live site FAILING this check. 'dap' = missing Digital Analytics Program tag; 'uswds' = not using the US Web Design System; others cover HTTPS enforcement, HSTS, IPv6, mobile viewport, sitemap.xml, robots.txt. Ignored in other modes."
          },
          "failingPillars": {
            "title": "Must-fail filters (sites mode)",
            "type": "array",
            "description": "Optional compliance filters for 'sites' mode: only export sites that FAIL every listed pillar. Allowed values: dap, uswds, https_enforced, hsts, ipv6, viewport_meta_tag, sitemap_xml, robots_txt. Example: [\"dap\", \"uswds\"] returns sites missing both DAP and USWDS. Ignored in other modes.",
            "items": {
              "type": "string",
              "enum": [
                "dap",
                "uswds",
                "https_enforced",
                "hsts",
                "ipv6",
                "viewport_meta_tag",
                "sitemap_xml",
                "robots_txt"
              ],
              "enumTitles": [
                "Missing DAP analytics",
                "No USWDS design system",
                "HTTPS not enforced",
                "No HSTS",
                "No IPv6",
                "No mobile viewport tag",
                "No sitemap.xml",
                "No robots.txt"
              ]
            }
          },
          "domainContains": {
            "title": "Domain contains",
            "type": "string",
            "description": "Optional case-insensitive substring filter on the site URL/domain, e.g. \"va.gov\" or \"nasa\". Applied client-side after fetching."
          },
          "bureauContains": {
            "title": "Bureau contains",
            "type": "string",
            "description": "Optional case-insensitive substring filter on the bureau name, e.g. \"Forest Service\". Applied client-side after fetching."
          },
          "includeNonLive": {
            "title": "Include non-live sites",
            "type": "boolean",
            "description": "By default only live, fully scanned websites are analyzed (dead DNS / unreachable hosts are skipped so they cannot drag scores down). Set true to include every catalogued record.",
            "default": false
          },
          "completeAgencies": {
            "title": "Always cover a named agency in full",
            "type": "boolean",
            "description": "On by default. When you name specific agencies, each one is fetched in FULL so its scorecard describes the whole agency — several agencies are larger than the default maxResults (Health and Human Services 4,741 sites, Energy 4,508, Defense 3,279, NASA 2,230), and before this option every one of them was scored from a partial slice with no warning. maxResults still caps the rows written to the dataset, so this does not change what you pay. Turn it off to trade completeness for fewer API requests — the coverage_pct and is_complete fields on every row will then tell you exactly what fraction was measured.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Caps the rows written to the dataset (and, on a national sweep, the sites fetched at 100 per request). Default 2000. With a named agency and completeAgencies on, the whole agency is fetched regardless and this only limits output rows. Raise to 20000 to sweep all ~29,600 federal sites in ~300 requests with your own free key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}