{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourcefinch-com/json-schema/sourcefinch-com-catalog-source-schema.json",
  "title": "CatalogSource",
  "description": "A SourceFinch Verified source: what the data is, typed fields, the Verified recipe document, a sample from SourceFinch's own latest green run, terms posture, usage rights (documented provenance, not legal advice) and 30-day reliability. Create a monitor from it with createSource using acquisition_path.endpoint, recipe.definition and recipe.key_field.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourcefinch-com-openapi.json#/components/schemas/CatalogSource",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "data_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "update_cadence": {
      "type": "string"
    },
    "origins": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "updated_at": {
      "type": "string"
    },
    "publisher": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "homepage": {
          "type": [
            "string",
            "null"
          ]
        },
        "jurisdiction": {
          "type": [
            "string",
            "null"
          ]
        },
        "public_body": {
          "type": "boolean"
        }
      },
      "required": [
        "slug",
        "name",
        "homepage",
        "jurisdiction",
        "public_body"
      ],
      "additionalProperties": false
    },
    "terms": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number"
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "permits",
            "silent",
            "restricts",
            "prohibits",
            "unknown"
          ]
        },
        "robots_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "robots_sha256": {
          "type": [
            "string",
            "null"
          ]
        },
        "robots_verdict": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "allowed",
                "disallowed",
                "partial",
                "absent",
                "unknown"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "ai_signals": {
          "type": "object",
          "additionalProperties": {}
        },
        "public_record": {
          "type": "boolean"
        },
        "public_record_citation": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewed_at": {
          "type": "string"
        },
        "next_review_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "url",
        "summary",
        "status",
        "robots_url",
        "robots_sha256",
        "robots_verdict",
        "ai_signals",
        "public_record",
        "public_record_citation",
        "reviewed_at",
        "next_review_at"
      ],
      "additionalProperties": false
    },
    "usage_rights": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number"
        },
        "licence_basis": {
          "type": "string",
          "enum": [
            "public_domain_gov",
            "open_data_licence",
            "site_terms",
            "licensed_feed",
            "customer_supplied",
            "unknown"
          ]
        },
        "licence_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "commercial_use": {
          "type": "string",
          "enum": [
            "allowed",
            "restricted",
            "prohibited",
            "unknown"
          ]
        },
        "redistribution": {
          "type": "string",
          "enum": [
            "allowed",
            "restricted",
            "prohibited",
            "unknown"
          ]
        },
        "attribution_required": {
          "type": "boolean"
        },
        "attribution_text": {
          "type": [
            "string",
            "null"
          ]
        },
        "terms_snapshot_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "terms_snapshot_sha256": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewed_at": {
          "type": "string"
        },
        "next_review_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "licence_basis",
        "licence_id",
        "commercial_use",
        "redistribution",
        "attribution_required",
        "attribution_text",
        "terms_snapshot_url",
        "terms_snapshot_sha256",
        "reviewed_at",
        "next_review_at"
      ],
      "additionalProperties": false
    },
    "acquisition_path": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "official_api",
            "bulk_file",
            "open_data_portal",
            "licensed_feed",
            "publisher_partnership",
            "pay_per_crawl",
            "public_web",
            "customer_authorized",
            "records_request",
            "manual_upload"
          ]
        },
        "endpoint": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "degraded",
            "blocked",
            "closed",
            "unknown"
          ]
        },
        "status_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "terms_basis": {
          "type": "object",
          "additionalProperties": {}
        },
        "reviewed_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "endpoint",
        "status",
        "status_reason",
        "terms_basis",
        "reviewed_at"
      ],
      "additionalProperties": false
    },
    "recipe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": "string"
        },
        "changelog": {
          "type": [
            "string",
            "null"
          ]
        },
        "schema_hash": {
          "type": "string"
        },
        "approved_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "key_field": {
          "type": [
            "string",
            "null"
          ]
        },
        "schedule": {
          "type": "string",
          "enum": [
            "hourly",
            "daily",
            "weekly"
          ]
        },
        "definition": {
          "$ref": "#/$defs/Recipe"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "string",
                  "integer",
                  "number",
                  "boolean",
                  "date",
                  "datetime",
                  "url",
                  "enum"
                ]
              },
              "description": {
                "type": "string",
                "minLength": 10,
                "maxLength": 500
              },
              "nullable": {
                "default": false,
                "type": "boolean"
              },
              "values": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              }
            },
            "required": [
              "name",
              "type",
              "description"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "version_id",
        "name",
        "author",
        "version",
        "changelog",
        "schema_hash",
        "approved_at",
        "key_field",
        "schedule",
        "definition",
        "fields"
      ],
      "additionalProperties": false
    },
    "sample": {
      "type": "object",
      "properties": {
        "run_id": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "captured_at": {
          "type": "string"
        },
        "first_captured_at": {
          "type": "string"
        },
        "record_count": {
          "type": "number"
        },
        "records": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "evidence_sha256": {
          "type": "string"
        },
        "execution_ms": {
          "type": [
            "number",
            "null"
          ]
        },
        "manifest": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "sha256": {
              "type": "string"
            },
            "signed": {
              "type": "boolean"
            },
            "key_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "anchored_at": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "sha256",
            "signed",
            "key_id",
            "anchored_at"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "run_id",
        "url",
        "captured_at",
        "first_captured_at",
        "record_count",
        "records",
        "evidence_sha256",
        "execution_ms",
        "manifest"
      ],
      "additionalProperties": false
    },
    "reliability": {
      "type": "object",
      "properties": {
        "days": {
          "type": "number"
        },
        "runs": {
          "type": "number"
        },
        "success": {
          "type": "number"
        },
        "degraded": {
          "type": "number"
        },
        "failed": {
          "type": "number"
        },
        "p50_ms": {
          "type": [
            "number",
            "null"
          ]
        },
        "p95_ms": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "days",
        "runs",
        "success",
        "degraded",
        "failed",
        "p50_ms",
        "p95_ms"
      ],
      "additionalProperties": false
    },
    "health": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "healthy",
            "degraded",
            "failing"
          ]
        },
        "last_run_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_run_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_success_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "status",
        "last_run_at",
        "last_run_status",
        "last_success_at"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "slug",
    "name",
    "summary",
    "description",
    "category",
    "data_domains",
    "update_cadence",
    "origins",
    "updated_at",
    "publisher",
    "terms",
    "usage_rights",
    "acquisition_path",
    "recipe",
    "sample",
    "reliability",
    "health"
  ],
  "additionalProperties": false,
  "$defs": {
    "Recipe": {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "const": "sourcefinch/recipe@1"
        },
        "mode": {
          "default": "http",
          "type": "string",
          "enum": [
            "http",
            "browser"
          ]
        },
        "format": {
          "default": "html",
          "type": "string",
          "enum": [
            "html",
            "json",
            "xml",
            "csv"
          ]
        },
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "fields": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$"
          },
          "additionalProperties": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "connector": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          "required": [
            "id",
            "version"
          ],
          "additionalProperties": false
        },
        "flow": {
          "type": "object",
          "properties": {
            "baseUrl": {
              "type": "string",
              "format": "uri"
            },
            "steps": {
              "minItems": 1,
              "maxItems": 32,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                  },
                  "method": {
                    "default": "GET",
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST"
                    ]
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 8192
                  },
                  "headers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 8192
                    }
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 8192
                  },
                  "capture": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "json"
                            },
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512,
                              "pattern": "^\\$?([.][A-Za-z_][A-Za-z0-9_-]*|\\[\\d+\\])+$"
                            }
                          },
                          "required": [
                            "kind",
                            "path"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "regex"
                            },
                            "pattern": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "group": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "kind",
                            "pattern"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "expect": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 599
                      },
                      "contains": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      "notContains": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      }
                    },
                    "additionalProperties": false
                  },
                  "extract": {
                    "type": "boolean",
                    "const": true
                  },
                  "paginate": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "step": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000
                      },
                      "maxPages": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "maxPages"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "url"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "baseUrl",
            "steps"
          ],
          "additionalProperties": false
        },
        "inputs": {
          "type": "object",
          "properties": {
            "datasetId": {
              "type": "string",
              "format": "uuid"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "key": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
            },
            "max": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "datasetId",
            "version",
            "key",
            "max"
          ],
          "additionalProperties": false
        },
        "pagination": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "param"
                },
                "param": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,40}$"
                },
                "start": {
                  "default": 1,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100000
                },
                "step": {
                  "default": 1,
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000
                },
                "maxPages": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 5
                }
              },
              "required": [
                "kind",
                "param",
                "maxPages"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "next"
                },
                "selector": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "maxPages": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 5
                }
              },
              "required": [
                "kind",
                "selector",
                "maxPages"
              ],
              "additionalProperties": false
            }
          ]
        },
        "waitFor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "click"
                  },
                  "selector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "times": {
                    "default": 1,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "required": [
                  "kind",
                  "selector"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "scroll"
                  },
                  "times": {
                    "default": 3,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "waitFor"
                  },
                  "selector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "kind",
                  "selector"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "dismiss"
                  },
                  "selector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "kind",
                  "selector"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "select"
                  },
                  "selector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[^\\u0000-\\u001f\\u007f]*$"
                  }
                },
                "required": [
                  "kind",
                  "selector",
                  "value"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "fill"
                  },
                  "selector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "pattern": "^[^\\u0000-\\u001f\\u007f]*$"
                  },
                  "submit": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "selector",
                  "value"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": {
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$"
          }
        },
        "csv": {
          "type": "object",
          "properties": {
            "delimiter": {
              "default": ",",
              "type": "string",
              "enum": [
                ",",
                "\t",
                ";",
                "|"
              ]
            },
            "header": {
              "default": true,
              "type": "boolean"
            },
            "encoding": {
              "default": "utf-8",
              "type": "string",
              "enum": [
                "utf-8",
                "latin1",
                "windows-1252"
              ]
            }
          },
          "additionalProperties": false
        },
        "types": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "string",
              "integer",
              "number",
              "boolean",
              "date",
              "datetime"
            ]
          }
        }
      },
      "required": [
        "items",
        "fields"
      ],
      "additionalProperties": false
    }
  }
}