{
  "openapi": "3.0.1",
  "info": {
    "title": "News Blindspot",
    "description": "Detects open-data media coverage blindspots — topics heavily covered by one political side but undercovered by others. Uses GDELT, AllSides, and MBFC data only.",
    "version": "0.0",
    "x-build-id": "f8uA0sY3g1mtUiOSC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spirosdouk~news-blindspot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spirosdouk-news-blindspot",
        "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/spirosdouk~news-blindspot/runs": {
      "post": {
        "operationId": "runs-sync-spirosdouk-news-blindspot",
        "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/spirosdouk~news-blindspot/run-sync": {
      "post": {
        "operationId": "run-sync-spirosdouk-news-blindspot",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Search queries for GDELT",
            "default": [
              "climate change",
              "immigration"
            ]
          },
          "sinceHours": {
            "title": "Since Hours",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Lookback window (1–168 hours)",
            "default": 24
          },
          "blindspotThresholdPct": {
            "title": "Blindspot Threshold %",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Side must be below this % to flag (0–100)",
            "default": 20
          },
          "gapMinPct": {
            "title": "Gap Min %",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Minimum gap vs next side to flag (0–100)",
            "default": 12
          },
          "maxRepUrlsPerSide": {
            "title": "Max Representative URLs Per Side",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Representative URLs per side (1–20)",
            "default": 3
          },
          "restrictToEnglish": {
            "title": "Restrict to English",
            "type": "boolean",
            "description": "Filter to English sources via GDELT",
            "default": true
          },
          "excludeUnknownFromBlindspot": {
            "title": "Exclude Unknown from Blindspot",
            "type": "boolean",
            "description": "Use known-only shares for blindspot math",
            "default": true
          },
          "overridesPath": {
            "title": "Overrides Path",
            "type": "string",
            "description": "Path to overrides JSON: { \"example.com\": \"left|center|right\" }",
            "default": "./bias-overrides.json"
          },
          "enableLearning": {
            "title": "Enable Learning",
            "type": "boolean",
            "description": "Enable conservative alias learning",
            "default": true
          },
          "learningMinCount": {
            "title": "Learning Min Count",
            "minimum": 2,
            "maximum": 100,
            "type": "integer",
            "description": "Min samples to learn alias (2–100)",
            "default": 3
          },
          "learningMinConsistency": {
            "title": "Learning Min Consistency",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Min consistency to learn alias (0–1)",
            "default": 0.8
          },
          "suggestionsMax": {
            "title": "Suggestions Max",
            "minimum": 0,
            "type": "integer",
            "description": "Max override suggestions to emit",
            "default": 15
          },
          "suggestionsMinCount": {
            "title": "Suggestions Min Count",
            "minimum": 0,
            "type": "integer",
            "description": "Min count for override suggestions",
            "default": 2
          },
          "enableLlmWeakLabeler": {
            "title": "Enable LLM Weak Labeler",
            "type": "boolean",
            "description": "Enable LLM weak labeler (OFF by default, recommended)",
            "default": false
          },
          "llmMaxDomains": {
            "title": "LLM Max Domains",
            "minimum": 0,
            "type": "integer",
            "description": "Max domains to label with LLM",
            "default": 15
          },
          "llmMinCount": {
            "title": "LLM Min Count",
            "minimum": 0,
            "type": "integer",
            "description": "Min articles per domain for LLM labeling",
            "default": 3
          },
          "llmConfidenceThreshold": {
            "title": "LLM Confidence Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "LLM confidence threshold (0–1)",
            "default": 0.8
          },
          "llmMarginThreshold": {
            "title": "LLM Margin Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "LLM margin threshold (0–1)",
            "default": 0.12
          },
          "llmSampleTitlesPerDomain": {
            "title": "LLM Sample Titles Per Domain",
            "minimum": 1,
            "type": "integer",
            "description": "Sample titles per domain for LLM",
            "default": 8
          },
          "forceRefreshCache": {
            "title": "Force Refresh Cache",
            "type": "boolean",
            "description": "Force refresh of bias cache",
            "default": false
          },
          "autoWriteSuggestedOverrides": {
            "title": "Auto Write Suggested Overrides",
            "type": "boolean",
            "description": "Automatically write suggested overrides to file",
            "default": false
          },
          "autoOverridesMax": {
            "title": "Auto Overrides Max",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of auto-written overrides",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}