{
  "openapi": "3.1.0",
  "info": {
    "title": "Delta Registry — World Bank Procurement + Debarment - Delta JSON Feed",
    "description": "Monitors the World Bank's public Procurement Notices API and 'Other Sanctions' debarment table, normalizing records into a consistent 18-field schema with cross-run delta detection (new, status-changed, updated). World Bank only — ADB and IDB were researched and excluded as inaccessible.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dyzTtWjfyYd7bvUZY/runs": {
      "post": {
        "operationId": "startActor20MdbProcurementMonitorRun",
        "summary": "Start an async run of: Monitors the World Bank's public Procurement Notices API and 'Other Sanctions' debarment table, normalizing records into a consistent 18-field schema with cross-run delta detection (new, status-changed, updated). World Bank only — ADB and IDB were researched and excluded as inaccessible.",
        "x-async-pattern-reason": "No production run history exists for this actor — defaulting to the async run+poll pattern as a precaution, not a measurement. Re-run this generator once real telemetry exists to potentially switch it to sync.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sources": {
                    "type": "array",
                    "description": "worldBankProcurementNotices = the live World Bank Procurement Notices API (search.worldbank.org). worldBankDebarredFirms = the World Bank's static 'Other Sanctions' debarment sub-table (worldbank.org). ADB and IDB are NOT selectable here - both were live-researched and found gated/non-compliant for v1 (Cloudflare/WAF for ADB; Power BI embed + robots.txt-blocked API for IDB) - see README.md.",
                    "default": [
                      "worldBankProcurementNotices",
                      "worldBankDebarredFirms"
                    ],
                    "items": {
                      "type": "string",
                      "enum": [
                        "worldBankProcurementNotices",
                        "worldBankDebarredFirms"
                      ]
                    },
                    "minItems": 1
                  },
                  "maxItemsPerSource": {
                    "type": "integer",
                    "description": "Hard cap on how many records to return per selected source this run. For worldBankProcurementNotices this bounds rows/os pagination against a live corpus of several hundred thousand notices; for worldBankDebarredFirms it is a no-op ceiling since the 'Other Sanctions' sub-table is a single small page.",
                    "default": 100,
                    "minimum": 1
                  },
                  "onlyNew": {
                    "type": "boolean",
                    "description": "When enabled, persists a content fingerprint per Procurement Notice between runs (in this actor's own named key-value store) and returns only notices that are new since the last run OR whose notice_status or other tracked fields changed since they were last seen - notices identical to last time are skipped. is_new is always populated (true/false) regardless of this setting. Only applies to worldBankProcurementNotices - Other Sanctions has no delta-tracking concept (a small static snapshot page, not a dated/paginated feed). The World Bank Procurement Notices API documents no server-side 'since' filter, so pagination always walks from the start of the result set each run - onlyNew filters c...",
                    "default": false
                  },
                  "countryFilter": {
                    "type": "array",
                    "description": "Optional client-side filter on project_ctry_name (e.g. 'Kenya', 'India'). The World Bank API documents no server-side country filter parameter, so this is applied after fetching each page."
                  },
                  "noticeTypeFilter": {
                    "type": "array",
                    "description": "Optional client-side filter on notice_type (e.g. 'Invitation for Bids', 'Request for Expression of Interest', 'Contract Award'). Applied after fetching each page, same caveat as countryFilter."
                  },
                  "dateRange": {
                    "type": "string",
                    "description": "Optionally restrict procurement-notice results to records whose noticedate falls within this window. Not applied to worldBankDebarredFirms records (that source has no reliable per-record publish date field in the static sub-table).",
                    "enum": [
                      "24h",
                      "7d",
                      "30d"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Run started. Poll GET /actor-runs/{runId} with the returned run id until status is SUCCEEDED, then fetch its dataset items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/actor-runs/{runId}": {
      "get": {
        "operationId": "getActor20MdbProcurementMonitorRunStatus",
        "summary": "Poll the status of a previously started run.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current run status. When status is SUCCEEDED, fetch the dataset via GET /datasets/{datasetId}/items, passing this response's defaultDatasetId field as {datasetId}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "defaultDatasetId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/datasets/{datasetId}/items": {
      "get": {
        "operationId": "getActor20MdbProcurementMonitorDatasetItems",
        "summary": "Fetch the dataset items produced by a completed run.",
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of normalized records from the actor run.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "actorSpecification": 1,
                    "title": "Dataset Schema",
                    "fields": {
                      "type": "object",
                      "properties": {
                        "record_id": {
                          "title": "Record ID",
                          "type": "string",
                          "description": "Stable across runs. Prefixed per sub-source ('wb-procnotice-<id>', 'wb-sanction-<slug>') since this single actor emits more than one native record shape."
                        },
                        "event_type": {
                          "title": "Event Type",
                          "type": "string",
                          "description": "Procurement notices: NEW_LISTING on first sighting, STATUS_CHANGE if notice_status changed since last seen, UPDATED if some other tracked field changed, SNAPSHOT_NO_DIFF if identical (only delivered when onlyNew=false). SANCTION for every Other Sanctions entry (no delta concept on that static-snapshot sub-source). SNAPSHOT_NO_DIFF also used for the degraded-extraction fallback notice."
                        },
                        "scraped_at": {
                          "title": "Scraped At",
                          "type": "string",
                          "description": "ISO-8601 timestamp of this extraction"
                        },
                        "is_new": {
                          "title": "Is New",
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "true/false in delta mode (onlyNew input), null when delta mode is off"
                        },
                        "source_url": {
                          "title": "Source URL",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "recipient_or_defendant_name": {
                          "title": "Recipient / Defendant Name",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "null for procurement notices (no recipient/winner field is present on this WB endpoint - see README); the sanctioned firm name for Other Sanctions records"
                        },
                        "entity_identifier_native": {
                          "title": "Entity Identifier (native)",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "value_native": {
                          "title": "Value (native)",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Always null - neither source exposes a monetary value field (documented honestly, not a parsing gap)"
                        },
                        "value_currency": {
                          "title": "Value Currency",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "value_usd_normalized": {
                          "title": "Value USD Normalized",
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "effective_date_iso": {
                          "title": "Effective Date (ISO)",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "submission_deadline_date for procurement notices; parsed sanction-imposition date for Other Sanctions (null when the source text isn't a cleanly parseable date, e.g. 'Ongoing')"
                        },
                        "publish_date_iso": {
                          "title": "Publish Date (ISO)",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Parsed from noticedate (procurement notices only)"
                        },
                        "category_or_type": {
                          "title": "Category / Type",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "notice_type for procurement notices; the 'Sanction Imposed' text for Other Sanctions"
                        },
                        "status_or_estado": {
                          "title": "Status",
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "notice_status for procurement notices; the raw 'Date of Imposition of Sanction' cell text for Other Sanctions (mixes dates and statuses like 'Ongoing' in the source - kept verbatim rather than force-split)"
                        },
                        "awarding_or_regulating_agency": {
                          "title": "Awarding / Regulating Agency",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "jurisdiction": {
                          "title": "Jurisdiction",
                          "type": "string",
                          "description": "'WB' for both World Bank sub-sources. Not one of the fleet's 11 closed JurisdictionCode values - this is a supranational institution, not a national/subnational government."
                        },
                        "source_document_url": {
                          "title": "Source Document URL",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "reference_number": {
                          "title": "Reference Number",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "views": {
                      "overview": {
                        "title": "Overview",
                        "transformation": {
                          "fields": [
                            "event_type",
                            "record_id",
                            "recipient_or_defendant_name",
                            "category_or_type",
                            "status_or_estado",
                            "publish_date_iso",
                            "effective_date_iso",
                            "awarding_or_regulating_agency",
                            "jurisdiction",
                            "source_url"
                          ]
                        },
                        "display": {
                          "component": "table",
                          "columns": [
                            {
                              "label": "Type",
                              "format": "text",
                              "field": "event_type"
                            },
                            {
                              "label": "Record ID",
                              "format": "text",
                              "field": "record_id"
                            },
                            {
                              "label": "Recipient / Firm",
                              "format": "text",
                              "field": "recipient_or_defendant_name"
                            },
                            {
                              "label": "Category",
                              "format": "text",
                              "field": "category_or_type"
                            },
                            {
                              "label": "Status",
                              "format": "text",
                              "field": "status_or_estado"
                            },
                            {
                              "label": "Published",
                              "format": "text",
                              "field": "publish_date_iso"
                            },
                            {
                              "label": "Effective / Deadline",
                              "format": "text",
                              "field": "effective_date_iso"
                            },
                            {
                              "label": "Agency",
                              "format": "text",
                              "field": "awarding_or_regulating_agency"
                            },
                            {
                              "label": "Jurisdiction",
                              "format": "text",
                              "field": "jurisdiction"
                            },
                            {
                              "label": "Source",
                              "format": "text",
                              "field": "source_url"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApifyBearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "ApifyBearerAuth": []
    }
  ]
}