{
  "openapi": "3.0.1",
  "info": {
    "title": "African SME Opportunities Scraper & AI Matcher",
    "description": "Discover and structure grants, tenders, accelerators, training and empowerment opportunities for African SMEs from public websites and social-media pages.",
    "version": "0.3",
    "x-build-id": "1T35mQdSB2xn26LPA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loisadex~scouvela-african-sme-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loisadex-scouvela-african-sme-opportunities",
        "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/loisadex~scouvela-african-sme-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-loisadex-scouvela-african-sme-opportunities",
        "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/loisadex~scouvela-african-sme-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-loisadex-scouvela-african-sme-opportunities",
        "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": "What opportunity do you need?",
            "type": "string",
            "description": "Natural-language need, for example opportunities for women-owned fashion businesses. Never used as a CSS selector or raw crawl URL."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "MVP sources currently cover Nigeria, Ghana and Kenya, plus Africa-wide programmes. Do not treat this as full continental coverage.",
            "items": {
              "type": "string",
              "enum": [
                "Africa-wide",
                "Nigeria",
                "Ghana",
                "Kenya",
                "South Africa",
                "Rwanda"
              ],
              "enumTitles": [
                "Africa-wide",
                "Nigeria",
                "Ghana",
                "Kenya",
                "South Africa",
                "Rwanda"
              ]
            },
            "default": [
              "Nigeria",
              "Ghana",
              "Kenya"
            ]
          },
          "opportunityTypes": {
            "title": "Opportunity types",
            "type": "array",
            "description": "Leave empty to keep every matching type from the selected sources.",
            "items": {
              "type": "string",
              "enum": [
                "grant",
                "loan",
                "funding",
                "contract",
                "tender",
                "procurement",
                "accelerator",
                "incubator",
                "competition",
                "training",
                "mentorship",
                "market-access",
                "export",
                "equipment-support",
                "technology-credit",
                "business-support",
                "other"
              ]
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many valid opportunities to save. Default 20. Hard cap 50. You pay per saved dataset item.",
            "default": 20
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Optional sector hints such as fashion, agriculture or green.",
            "items": {
              "type": "string"
            }
          },
          "targetGroups": {
            "title": "Target groups",
            "type": "array",
            "description": "Optional. Keep programmes aimed at groups such as women-owned, youth-owned or green businesses.",
            "items": {
              "type": "string",
              "enum": [
                "all-smes",
                "women-owned",
                "youth-owned",
                "disability-inclusive",
                "rural-businesses",
                "startups",
                "informal-businesses",
                "exporters",
                "social-enterprises",
                "agribusinesses",
                "creative-businesses",
                "technology-businesses",
                "green-businesses"
              ]
            }
          },
          "businessStages": {
            "title": "Business stages",
            "type": "array",
            "description": "Optional. idea, early-stage, growth or export-ready.",
            "items": {
              "type": "string",
              "enum": [
                "idea",
                "early-stage",
                "growth",
                "export-ready"
              ]
            }
          },
          "includeExpired": {
            "title": "Include expired opportunities",
            "type": "boolean",
            "description": "Keep programmes whose published deadline has already passed.",
            "default": false
          },
          "closingWithinDays": {
            "title": "Closing within days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Only keep opportunities with a deadline inside this many days."
          },
          "requireDeadline": {
            "title": "Require a deadline",
            "type": "boolean",
            "description": "If enabled, drop opportunities that do not publish a deadline.",
            "default": false
          },
          "requireApplicationUrl": {
            "title": "Require an application URL",
            "type": "boolean",
            "description": "If enabled, drop opportunities that do not include an application link.",
            "default": false
          },
          "ai": {
            "title": "AI Opportunity Agent",
            "type": "object",
            "description": "Optional. Standard extraction works with AI off. When enabled, you supply your own OpenAI key. Scouvela charges only for successful AI events; OpenAI bills you separately.",
            "properties": {
              "enabled": {
                "title": "Enable AI matching",
                "type": "boolean",
                "description": "Plans the search, summarises each saved opportunity, and optionally writes a brief. Failed AI calls are not charged.",
                "default": false
              },
              "provider": {
                "title": "Provider",
                "type": "string",
                "description": "Only OpenAI is supported in this version. You pay that provider directly.",
                "enum": [
                  "openai"
                ],
                "enumTitles": [
                  "OpenAI"
                ],
                "default": "openai"
              },
              "model": {
                "title": "Model",
                "type": "string",
                "description": "OpenAI model name. Default gpt-4.1-mini.",
                "editor": "textfield",
                "default": "gpt-4.1-mini"
              },
              "generateReport": {
                "title": "Generate an opportunity brief",
                "type": "boolean",
                "description": "Writes OPPORTUNITY_REPORT to the key-value store. Charged as ai-opportunity-report only when the brief is saved.",
                "default": false
              }
            }
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Required only when AI matching is on. Stored as an Apify secret. Never logged or saved on records. You pay OpenAI directly."
          },
          "sourceTypes": {
            "title": "Discovery sources",
            "type": "array",
            "description": "Curated websites stay on by default. Add submitted public webpages or public Instagram pages when you want Scouvela to read those URLs itself.",
            "items": {
              "type": "string",
              "enum": [
                "curated-websites",
                "custom-webpages",
                "instagram"
              ],
              "enumTitles": [
                "Curated opportunity websites",
                "Submitted public webpages",
                "Public Instagram pages"
              ]
            },
            "default": [
              "curated-websites"
            ]
          },
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Optional public webpage or Instagram URLs. Maximum 20. HTTP and HTTPS only. Localhost, private-network addresses, and embedded credentials are rejected. URLs are not used as code or selectors.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "discoverFromProfiles": {
            "title": "Read recent public profile posts",
            "type": "boolean",
            "description": "When enabled, Scouvela may inspect a limited number of recent publicly visible posts from a submitted supported profile.",
            "default": false
          },
          "maxPostsPerProfile": {
            "title": "Maximum posts per profile",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Used only when reading recent public profile posts is enabled. Minimum 1, maximum 10.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}