{
  "openapi": "3.0.1",
  "info": {
    "title": "World Bank Projects Search",
    "description": "Search and extract structured data from the World Bank's official development project database. Query thousands of internationally funded projects across 170+ countries by keyword, country, status, and sector -- returning clean, normalized JSON with financial commitments, dates, sectors, themes, ...",
    "version": "2.0",
    "x-build-id": "m4GcqJ3elffWjA32v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~world-bank-projects/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-world-bank-projects",
        "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/ryanclinton~world-bank-projects/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-world-bank-projects",
        "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/ryanclinton~world-bank-projects/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-world-bank-projects",
        "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": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Search keyword for project name and description (e.g. 'renewable energy', 'water supply', 'education')",
            "default": "renewable energy"
          },
          "country": {
            "title": "Country Code(s)",
            "type": "string",
            "description": "ISO alpha-2 country code(s). Supports multiple comma-separated codes (e.g. 'IN,BR,KE' for India, Brazil, Kenya)"
          },
          "region": {
            "title": "Region",
            "enum": [
              "",
              "Africa",
              "East Asia and Pacific",
              "Europe and Central Asia",
              "Latin America and Caribbean",
              "Middle East and North Africa",
              "South Asia",
              "Other"
            ],
            "type": "string",
            "description": "Filter by World Bank region",
            "default": ""
          },
          "status": {
            "title": "Project Status",
            "enum": [
              "",
              "Active",
              "Closed",
              "Pipeline",
              "Dropped"
            ],
            "type": "string",
            "description": "Filter by project lifecycle status",
            "default": ""
          },
          "sector": {
            "title": "Sector",
            "type": "string",
            "description": "Filter by sector keyword (e.g. 'Energy', 'Health', 'Education', 'Transport', 'Water')"
          },
          "lendingType": {
            "title": "Lending Type",
            "enum": [
              "",
              "IPF",
              "DPL",
              "PforR",
              "GR",
              "TA"
            ],
            "type": "string",
            "description": "Filter by lending instrument type",
            "default": ""
          },
          "fromYear": {
            "title": "From Year",
            "minimum": 1947,
            "maximum": 2030,
            "type": "integer",
            "description": "Filter projects approved from this fiscal year onward (e.g. 2020)"
          },
          "toYear": {
            "title": "To Year",
            "minimum": 1947,
            "maximum": 2030,
            "type": "integer",
            "description": "Filter projects approved up to this fiscal year (e.g. 2025)"
          },
          "minCommitment": {
            "title": "Minimum Commitment ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return projects with total commitment above this amount in USD (e.g. 100000000 for $100M)"
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "completeness",
              "commitment",
              "date",
              "score"
            ],
            "type": "string",
            "description": "How to sort and rank the output results",
            "default": "completeness"
          },
          "scoringProfile": {
            "title": "Scoring Profile",
            "enum": [
              "balanced",
              "large-deals",
              "recent-first",
              "data-quality",
              "procurement-opportunity"
            ],
            "type": "string",
            "description": "Weight distribution for the composite score. Affects ranking when sorted by score.",
            "default": "balanced"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of projects to return. Set to 0 for unlimited (fetches all matching projects).",
            "default": 25
          },
          "includeDocuments": {
            "title": "Include Documents",
            "type": "boolean",
            "description": "Fetch document links (PADs, ISRs, ICRs) for each project from the World Bank Documents API. Adds ~1 second per project.",
            "default": false
          },
          "includeProcurement": {
            "title": "Include Procurement Notices",
            "type": "boolean",
            "description": "Fetch procurement notices (tenders, bids, contract awards) for each project from the World Bank Procurement API. Adds ~1 second per project.",
            "default": false
          },
          "enableChangeDetection": {
            "title": "Enable Change Detection",
            "type": "boolean",
            "description": "Track changes between runs. Flags new projects and status changes since the last run. Requires scheduled runs to be useful.",
            "default": false
          },
          "ragMode": {
            "title": "RAG-Ready Output",
            "type": "boolean",
            "description": "Add a ragText field with clean, structured plain text for each project — ready for chunking and embedding in RAG pipelines.",
            "default": false
          },
          "dashboard": {
            "title": "Generate Dashboard",
            "type": "boolean",
            "description": "Create an interactive HTML dashboard with charts showing commitments by region, sector, tier, and approval timeline. Saved to key-value store as DASHBOARD.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist Name",
            "type": "string",
            "description": "Name a watchlist to save this search configuration. On subsequent runs with the same name, change detection will compare against the previous watchlist run. Useful for recurring monitoring."
          },
          "briefing": {
            "title": "Generate Executive Briefing",
            "type": "boolean",
            "description": "Create a text-based intelligence briefing with top opportunities, procurement signals, new projects, and portfolio breakdown. Saved to key-value store as BRIEFING.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}