{
  "openapi": "3.1.0",
  "info": {
    "title": "Grants Hub Developer API",
    "version": "1.0.0",
    "description": "Live UK grant matching and grant data for your own product. Send an organisation profile and get back the grants that fit it, ranked, with the reasons; score one organisation against one grant; or read short feeds of the newest, closing-soon and largest open grants. Grants come from UK government, lottery, council, trust and foundation funders, are updated daily, and only open grants are returned.\n\nAuthenticate every call (except `/v1/match/vocab`) with your key in the `X-API-Key` header. Keys come from your developer dashboard after choosing a plan at https://grantshub.co.uk/developers#pricing.\n\nEach plan has a monthly call allowance, a maximum number of results per call, and a monthly cap on how many different grants an account can be shown. Grants already shown to you can be fetched again at no extra cost to that cap. Only successful calls count. Allowances reset on the 1st of each month.",
    "contact": {
      "name": "Grants Hub",
      "email": "hello@grantshub.co.uk",
      "url": "https://grantshub.co.uk/developers"
    },
    "termsOfService": "https://grantshub.co.uk/terms",
    "x-logo": {
      "url": "https://grantshub.co.uk/logo.png"
    }
  },
  "paths": {
    "/v1/match": {
      "post": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Match grants to an organisation",
        "operationId": "post_match",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevMatchRequest"
              },
              "example": {
                "organisation_type": "Charity",
                "sector": "Arts / Culture",
                "region": "Scotland",
                "amount_needed": 10000,
                "mode": "rule_based",
                "top_n": 2
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevMatchResponse"
                },
                "example": {
                  "matches": [
                    {
                      "title": "National Churches Trust: Large Grants",
                      "funder": "National Churches Trust",
                      "amount_min_gbp": null,
                      "amount_max_gbp": 50000.0,
                      "amount_text": "up to £50,000 for:",
                      "open_date": null,
                      "close_date": "2026-11-03",
                      "eligibility": "These questions form part of the application for a Large Grant. If you cannot answer yes to each question, your application will not be successful.\n\n• Is your building a Christian place of worship in...",
                      "url": "https://www.nationalchurchestrust.org/get-support/grants/large-grants",
                      "score": 0.94,
                      "reasons": [
                        "Sector matches your focus area",
                        "Available in your region",
                        "Funding amount aligns with your need",
                        "Closing soon — apply promptly"
                      ],
                      "master_id": "g_18d8a6132a127745",
                      "match_fields": {
                        "applicant_types": [
                          "charity",
                          "faith_body"
                        ],
                        "area_scope": "uk",
                        "regions": null,
                        "local_areas": null,
                        "local_area_codes": null,
                        "purposes": [
                          "premises",
                          "health",
                          "faith"
                        ],
                        "technologies": null,
                        "sectors": null,
                        "is_challenge_call": false,
                        "funding_form": "grant",
                        "needs_partner": false,
                        "beneficiary_groups": [
                          "general"
                        ],
                        "age_min": null,
                        "age_max": null,
                        "faiths": null,
                        "professions": null,
                        "closed_now": false
                      }
                    },
                    {
                      "title": "Museums Galleries Scotland: Small Grants Fund",
                      "funder": "Museums Galleries Scotland",
                      "amount_min_gbp": null,
                      "amount_max_gbp": 15000.0,
                      "amount_text": "Up to £15,000",
                      "open_date": null,
                      "close_date": "2026-10-21",
                      "eligibility": "- In order to be eligible for MGS funding organisations must be able to demonstrate compliance with the Scottish Government’s Fair Work First policy which requires workers to receive payment of the re...",
                      "url": "https://www.museumsgalleriesscotland.org.uk/funding/small-grants-fund/",
                      "score": 0.92,
                      "reasons": [
                        "Sector matches your focus area",
                        "Available in your region",
                        "Funding amount aligns with your need",
                        "Closing soon — apply promptly"
                      ],
                      "master_id": "g_5e45a9a2f67454c2",
                      "match_fields": {
                        "applicant_types": [
                          "museum"
                        ],
                        "area_scope": "gb",
                        "regions": null,
                        "local_areas": null,
                        "local_area_codes": null,
                        "purposes": [
                          "core_costs",
                          "equipment",
                          "research_development",
                          "community",
                          "education"
                        ],
                        "technologies": null,
                        "sectors": null,
                        "is_challenge_call": false,
                        "funding_form": "grant",
                        "needs_partner": false,
                        "beneficiary_groups": [
                          "general"
                        ],
                        "age_min": null,
                        "age_max": null,
                        "faiths": null,
                        "professions": null,
                        "closed_now": false
                      }
                    }
                  ],
                  "distinct_grant_cap_notice": null
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "Ranked grants for an organisation profile, each with a score and plain-English reasons. Optional `filters` (values from `/v1/match/vocab`) and `min_score`. Results per call are capped by plan. `master_id` on each result can be passed to `/v1/score` or `/v1/proposal`."
      }
    },
    "/v1/match/vocab": {
      "get": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Allowed filter values",
        "operationId": "get_match_vocab",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevVocabResponse"
                }
              }
            }
          }
        },
        "description": "Every value `/v1/match` filters accept, with labels. No API key needed; not counted as a call.",
        "security": []
      }
    },
    "/v1/proposal": {
      "post": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Draft a proposal for one grant",
        "operationId": "post_proposal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevProposalResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "A tailored first-draft proposal for one organisation and one grant. Dev Pro and Enterprise only."
      }
    },
    "/v1/score": {
      "post": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Score one organisation against one grant",
        "operationId": "post_score",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevScoreRequest"
              },
              "example": {
                "grant_id": "g_4d6153b65d6baaaa",
                "sector": "Arts / Culture",
                "region": "Scotland",
                "amount_needed": 10000
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevScoreResponse"
                },
                "example": {
                  "master_id": "g_4d6153b65d6baaaa",
                  "title": "Halsary Windfarm Community Benefit Fund (Halkirk & District)",
                  "url": "https://www.foundationscotland.org.uk/apply-for-funding/funding-available/halsary-windfarm-community-benefit-fund-halkirk-district",
                  "score": 0.58,
                  "breakdown": {
                    "sector_fit": 0,
                    "region_fit": 30,
                    "size_turnover_fit": 20,
                    "deadline_feasibility": 8
                  },
                  "reasons": [
                    "Available in your region",
                    "Funding amount aligns with your need",
                    "Reasonable time to apply"
                  ],
                  "recommendation": "Moderate match — worth reviewing the eligibility criteria closely before applying."
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "A 0-1 score with a breakdown (sector, region, size, deadline), reasons and a one-line recommendation."
      }
    },
    "/v1/latest": {
      "get": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Newest grants",
        "operationId": "get_latest",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sector"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevCuratedList"
                },
                "example": {
                  "results": [
                    {
                      "master_id": "g_4d6153b65d6baaaa",
                      "title": "Halsary Windfarm Community Benefit Fund (Halkirk & District)",
                      "funder": "Foundation Scotland",
                      "amount_min_gbp": 10000.0,
                      "amount_max_gbp": 10000.0,
                      "amount_text": "Up to £10,000",
                      "open_date": null,
                      "close_date": "2026-12-15",
                      "eligibility": "Additional criteria\n\n• Local consultation: That you have consulted with the intended beneficiaries of the project and other local groups and/or businesses as appropriate, and that these are supportive...",
                      "url": "https://www.foundationscotland.org.uk/apply-for-funding/funding-available/halsary-windfarm-community-benefit-fund-halkirk-district"
                    },
                    {
                      "master_id": "g_d2197edc1840a7ec",
                      "title": "The South Kyle Wind Farm Community Benefit Fund",
                      "funder": "Foundation Scotland",
                      "amount_min_gbp": null,
                      "amount_max_gbp": null,
                      "amount_text": "Various (see How To Apply): No fixed amount",
                      "open_date": null,
                      "close_date": null,
                      "eligibility": "Community groups and organisations working to benefit people in the four communities within the area of benefit can apply to each of the local funds. One community is piloting an award to a local busi...",
                      "url": "https://www.foundationscotland.org.uk/apply-for-funding/funding-available/south-kyle-wind-farm-community-benefit-fund"
                    }
                  ],
                  "distinct_grant_cap_notice": null
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "Most recently updated open grants, optionally by region and sector."
      }
    },
    "/v1/ending-soon": {
      "get": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Grants closing soon",
        "operationId": "get_ending_soon",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sector"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevCuratedList"
                },
                "example": {
                  "results": [
                    {
                      "master_id": "g_e1bf5b5f941846cb",
                      "title": "Cross KIC EIT Innovation & Business Creation Business Plan 2026",
                      "funder": "European Commission / Horizon Europe",
                      "amount_min_gbp": null,
                      "amount_max_gbp": null,
                      "amount_text": null,
                      "open_date": "2026-09-07",
                      "close_date": "2026-10-21",
                      "eligibility": null,
                      "url": "https://ec.europa.eu/info/funding-tenders/opportunities/portal/screen/opportunities/topic-details/HORIZON-EIT-2025-KIC-IBA-INBC"
                    },
                    {
                      "master_id": "g_60aeabe527d27058",
                      "title": "Henry Smith Foundation – Domestic Abuse Fund",
                      "funder": "Henry Smith Foundation",
                      "amount_min_gbp": 50000.0,
                      "amount_max_gbp": 250000.0,
                      "amount_text": "All successful applicants will receive a grant of £250,000 over five years (£50,000 per year).",
                      "open_date": null,
                      "close_date": "2026-10-21",
                      "eligibility": "We want to fund specialist domestic abuse organisations with at least three years’ experience delivering counselling to victim-survivors of domestic abuse.\nEligible organisations: Charitable organisat...",
                      "url": "https://henrysmith.foundation/grants/domestic-abuse-counselling/?Ref=email&utm_campaign=5046210_Domestic%20Abuse%20Counselling%20Announcement&utm_medium=email&utm_source=dotdigital&dm_i=7NGA,305OI,6XTJI9,7TW9P,1,0,0,0"
                    }
                  ],
                  "distinct_grant_cap_notice": null
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "Open grants closing in the next 30 days, soonest first."
      }
    },
    "/v1/featured": {
      "get": {
        "tags": [
          "Developer API v1"
        ],
        "summary": "Largest awards",
        "operationId": "get_featured",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sector"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevCuratedList"
                },
                "example": {
                  "results": [
                    {
                      "master_id": "g_1d4785dbfa24f3aa",
                      "title": "Creative Foundations Fund",
                      "funder": "Arts Council England",
                      "amount_min_gbp": 100000.0,
                      "amount_max_gbp": 10000000.0,
                      "amount_text": "£100,000; £1 million; £10 million",
                      "open_date": null,
                      "close_date": null,
                      "eligibility": "Not-for-profit cultural organisations based in England.Organisations must demonstrate through their governance documents that their primary aims are cultural and that the activities they are applying...",
                      "url": "https://www.artscouncil.org.uk/our-open-funds/creative-foundations-fund-guidance-applicants"
                    },
                    {
                      "master_id": "g_f84abce65c713dfd",
                      "title": "The National Lottery Heritage Fund",
                      "funder": "The National Lottery Heritage Fund",
                      "amount_min_gbp": 10000000.0,
                      "amount_max_gbp": 10000000.0,
                      "amount_text": "No Min - £10,000,000",
                      "open_date": null,
                      "close_date": null,
                      "eligibility": "Applications from: £10,000 to £100,000 will be accepted from not-for-profit organisations, private owners of heritage and partnerships. £100,000 to £10 million will be accepted from not-for-profit org...",
                      "url": "https://www.heritagefund.org.uk/funding"
                    }
                  ],
                  "distinct_grant_cap_notice": null
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "400": {
            "description": "Unknown region, sector or filter value. Not counted as a call."
          },
          "401": {
            "description": "Missing or invalid X-API-Key."
          },
          "403": {
            "description": "Plan does not include this endpoint, the key's plan is inactive, or the monthly distinct-grant cap is reached. Not counted as a call."
          },
          "404": {
            "description": "Unknown grant_id. Not counted as a call."
          },
          "429": {
            "description": "Monthly call allowance used up; the message names the reset date."
          }
        },
        "description": "Open grants with the largest individual award amounts."
      }
    }
  },
  "components": {
    "schemas": {
      "DevCuratedGrant": {
        "properties": {
          "master_id": {
            "type": "string",
            "title": "Master Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "funder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Funder"
          },
          "amount_min_gbp": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Min Gbp"
          },
          "amount_max_gbp": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Max Gbp"
          },
          "amount_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Text"
          },
          "open_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Open Date"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "eligibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eligibility"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "master_id",
          "title",
          "funder",
          "amount_min_gbp",
          "amount_max_gbp",
          "amount_text",
          "open_date",
          "close_date",
          "eligibility",
          "url"
        ],
        "title": "DevCuratedGrant"
      },
      "DevCuratedList": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/DevCuratedGrant"
            },
            "type": "array",
            "title": "Results"
          },
          "distinct_grant_cap_notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Distinct Grant Cap Notice"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "DevCuratedList"
      },
      "DevGrantResult": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "funder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Funder"
          },
          "amount_min_gbp": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Min Gbp"
          },
          "amount_max_gbp": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Max Gbp"
          },
          "amount_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Text"
          },
          "open_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Open Date"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "eligibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eligibility"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Reasons"
          },
          "master_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Master Id"
          },
          "match_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Fields"
          }
        },
        "type": "object",
        "required": [
          "title",
          "funder",
          "amount_min_gbp",
          "amount_max_gbp",
          "amount_text",
          "open_date",
          "close_date",
          "eligibility",
          "url",
          "score",
          "reasons"
        ],
        "title": "DevGrantResult"
      },
      "DevMatchRequest": {
        "properties": {
          "organisation_type": {
            "type": "string",
            "title": "Organisation Type"
          },
          "sector": {
            "type": "string",
            "title": "Sector"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "amount_needed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Needed"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "mode": {
            "type": "string",
            "title": "Mode",
            "default": "combined"
          },
          "top_n": {
            "type": "integer",
            "title": "Top N",
            "default": 10
          },
          "min_score": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Score"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MatchFilters"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "organisation_type",
          "sector",
          "region"
        ],
        "title": "DevMatchRequest"
      },
      "DevMatchResponse": {
        "properties": {
          "matches": {
            "items": {
              "$ref": "#/components/schemas/DevGrantResult"
            },
            "type": "array",
            "title": "Matches"
          },
          "distinct_grant_cap_notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Distinct Grant Cap Notice"
          }
        },
        "type": "object",
        "required": [
          "matches"
        ],
        "title": "DevMatchResponse"
      },
      "DevProposalRequest": {
        "properties": {
          "grant_id": {
            "type": "string",
            "title": "Grant Id"
          },
          "organisation_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organisation Name"
          },
          "organisation_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organisation Type"
          },
          "sector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sector"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "paragraphs": {
            "type": "integer",
            "title": "Paragraphs",
            "default": 3
          },
          "user_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Note"
          }
        },
        "type": "object",
        "required": [
          "grant_id"
        ],
        "title": "DevProposalRequest"
      },
      "DevProposalResponse": {
        "properties": {
          "proposal": {
            "type": "string",
            "title": "Proposal"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "proposal",
          "url"
        ],
        "title": "DevProposalResponse"
      },
      "DevScoreBreakdown": {
        "properties": {
          "sector_fit": {
            "type": "integer",
            "title": "Sector Fit"
          },
          "region_fit": {
            "type": "integer",
            "title": "Region Fit"
          },
          "size_turnover_fit": {
            "type": "integer",
            "title": "Size Turnover Fit"
          },
          "deadline_feasibility": {
            "type": "integer",
            "title": "Deadline Feasibility"
          }
        },
        "type": "object",
        "required": [
          "sector_fit",
          "region_fit",
          "size_turnover_fit",
          "deadline_feasibility"
        ],
        "title": "DevScoreBreakdown"
      },
      "DevScoreRequest": {
        "properties": {
          "grant_id": {
            "type": "string",
            "title": "Grant Id"
          },
          "sector": {
            "type": "string",
            "title": "Sector"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "amount_needed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Needed"
          }
        },
        "type": "object",
        "required": [
          "grant_id",
          "sector",
          "region"
        ],
        "title": "DevScoreRequest"
      },
      "DevScoreResponse": {
        "properties": {
          "master_id": {
            "type": "string",
            "title": "Master Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "breakdown": {
            "$ref": "#/components/schemas/DevScoreBreakdown"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Reasons"
          },
          "recommendation": {
            "type": "string",
            "title": "Recommendation"
          }
        },
        "type": "object",
        "required": [
          "master_id",
          "title",
          "url",
          "score",
          "breakdown",
          "reasons",
          "recommendation"
        ],
        "title": "DevScoreResponse"
      },
      "DevVocabResponse": {
        "properties": {
          "vocab": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/DevVocabValue"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Vocab"
          },
          "filter_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Filter Fields"
          }
        },
        "type": "object",
        "required": [
          "vocab",
          "filter_fields"
        ],
        "title": "DevVocabResponse"
      },
      "DevVocabValue": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "nation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nation"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "county": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "County"
          }
        },
        "type": "object",
        "required": [
          "value"
        ],
        "title": "DevVocabValue"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MatchFilters": {
        "properties": {
          "applicant_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applicant Type"
          },
          "nation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nation"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "councils": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Councils"
          },
          "purposes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Purposes"
          },
          "sectors": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Sectors"
          },
          "technologies": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Technologies"
          },
          "beneficiary_groups": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Beneficiary Groups"
          },
          "partner_ok": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Partner Ok"
          },
          "money_only": {
            "type": "boolean",
            "title": "Money Only",
            "default": false
          }
        },
        "type": "object",
        "title": "MatchFilters",
        "description": "#1033. Every field is optional and applies only when sent. A grant whose\npage doesn't state the field is never removed by it."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Your key from the developer dashboard (starts gh_)."
      }
    }
  },
  "externalDocs": {
    "description": "Developer docs",
    "url": "https://grantshub.co.uk/developers/docs"
  },
  "servers": [
    {
      "url": "https://api.grantshub.co.uk",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Developer API v1",
      "description": "UK grant matching and grant data"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}