{
  "openapi": "3.0.1",
  "info": {
    "title": "TNL Intelligence",
    "description": "Evidence-first geopolitical, economic, supply-chain, asset exposure, and consequential-news intelligence with citations from The Neural Ledger.",
    "version": "0.1",
    "x-build-id": "4LGylsKIL7QEu4y3H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/theneuralledger~tnl-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-theneuralledger-tnl-intelligence",
        "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/theneuralledger~tnl-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-theneuralledger-tnl-intelligence",
        "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/theneuralledger~tnl-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-theneuralledger-tnl-intelligence",
        "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": [
          "apiKey",
          "operation"
        ],
        "properties": {
          "apiKey": {
            "title": "TNL API key",
            "type": "string",
            "description": "Your TNL API key. Apify stores this value as a masked secret and the Actor never writes it to logs or outputs."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "search_intelligence",
              "get_intelligence",
              "list_recent_changes",
              "get_exposure",
              "run_research",
              "get_weekly_edition"
            ],
            "type": "string",
            "description": "The TNL Intelligence workflow to execute.",
            "default": "search_intelligence"
          },
          "query": {
            "title": "Search query",
            "maxLength": 1000,
            "type": "string",
            "description": "Required for Search intelligence."
          },
          "id": {
            "title": "Intelligence ID or slug",
            "maxLength": 256,
            "type": "string",
            "description": "Required for Get intelligence item."
          },
          "since": {
            "title": "Changed since",
            "type": "string",
            "description": "ISO 8601 timestamp required for List recent changes."
          },
          "kind": {
            "title": "Exposure type",
            "enum": [
              "entity",
              "asset",
              "impact_path"
            ],
            "type": "string",
            "description": "Required for Get exposure."
          },
          "value": {
            "title": "Exposure value",
            "maxLength": 256,
            "type": "string",
            "description": "Entity, asset ticker, or impact-path identifier."
          },
          "from": {
            "title": "From",
            "type": "string",
            "description": "Optional ISO 8601 start timestamp."
          },
          "to": {
            "title": "To",
            "type": "string",
            "description": "Optional ISO 8601 end timestamp."
          },
          "category": {
            "title": "Category",
            "maxLength": 256,
            "type": "string",
            "description": "Optional TNL category filter."
          },
          "geography": {
            "title": "Geography",
            "maxLength": 256,
            "type": "string",
            "description": "Optional geography filter."
          },
          "entity": {
            "title": "Entity filter",
            "maxLength": 256,
            "type": "string",
            "description": "Optional entity filter for search."
          },
          "asset": {
            "title": "Asset filter",
            "maxLength": 256,
            "type": "string",
            "description": "Optional asset filter for search."
          },
          "impactPath": {
            "title": "Impact path filter",
            "maxLength": 256,
            "type": "string",
            "description": "Optional impact-path filter for search."
          },
          "pageSize": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of results to return, from 1 to 100.",
            "default": 20
          },
          "cursor": {
            "title": "Pagination cursor",
            "maxLength": 4096,
            "type": "string",
            "description": "Optional cursor returned by a previous run."
          },
          "includeBody": {
            "title": "Include story body",
            "type": "boolean",
            "description": "Include the full story body when the account and endpoint permit it.",
            "default": false
          },
          "workflowId": {
            "title": "Research workflow",
            "enum": [
              "what-changed",
              "compare-sources",
              "validate-event",
              "asset-exposure",
              "operational-risk",
              "weekly-consequential"
            ],
            "type": "string",
            "description": "Required for Run research."
          },
          "question": {
            "title": "Research question",
            "maxLength": 8000,
            "type": "string",
            "description": "Required for Run research. Use a specific, bounded question."
          },
          "asOf": {
            "title": "As-of timestamp",
            "type": "string",
            "description": "Optional research evidence boundary in ISO 8601 format."
          },
          "depth": {
            "title": "Research depth",
            "enum": [
              "brief",
              "standard",
              "deep"
            ],
            "type": "string",
            "description": "Evidence and analysis depth.",
            "default": "standard"
          },
          "storyIds": {
            "title": "Story IDs",
            "maxItems": 100,
            "type": "array",
            "description": "Optional story IDs to constrain research.",
            "items": {
              "type": "string",
              "maxLength": 256
            }
          },
          "entities": {
            "title": "Entities",
            "maxItems": 100,
            "type": "array",
            "description": "Optional entity names or IDs for research.",
            "items": {
              "type": "string",
              "maxLength": 256
            }
          },
          "assets": {
            "title": "Assets",
            "maxItems": 100,
            "type": "array",
            "description": "Optional asset names or tickers for research.",
            "items": {
              "type": "string",
              "maxLength": 256
            }
          },
          "weekEnding": {
            "title": "Week ending",
            "type": "string",
            "description": "Optional ISO 8601 end timestamp for Get weekly edition."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}