{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upgrowth-dz/json-schema/upgrowth-dz-meta-schema.json",
  "title": "Meta",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upgrowth-dz-openapi.yml#/components/schemas/Meta",
  "type": "object",
  "required": [
    "dataset",
    "source",
    "source_url",
    "licence",
    "licence_url",
    "attribution",
    "updated",
    "help"
  ],
  "properties": {
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2 code of the country the answer is about, for example DZ. Present on every successful answer: null only for the list of countries."
    },
    "dataset": {
      "type": "string",
      "description": "Identifier of the dataset the answer comes from."
    },
    "source": {
      "type": "string",
      "description": "Name of the source, in the language of the request."
    },
    "source_url": {
      "type": "string",
      "description": "The page that describes the source."
    },
    "licence": {
      "type": [
        "string",
        "null"
      ],
      "description": "The licence of the dataset: CC BY 4.0 for the datasets UpGrowth publishes under it, otherwise null."
    },
    "licence_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Link to the text of the licence, null when licence is null."
    },
    "attribution": {
      "type": "string",
      "description": "The credit to give when the data is used, in the language of the request: UpGrowth, with a link to https://www.upgrowth.dz."
    },
    "updated": {
      "type": [
        "string",
        "null"
      ],
      "description": "Day of the snapshot of the data, as YYYY-MM-DD. For the tax rates, social contributions and institutions: the day the official pages were read."
    },
    "notice": {
      "type": "string",
      "description": "Datasets without an open licence only: why. A null licence never means public domain."
    },
    "help": {
      "type": "object",
      "required": [
        "text",
        "url"
      ],
      "properties": {
        "text": {
          "type": "string",
          "description": "One sentence to pass on to the user."
        },
        "url": {
          "type": "string",
          "description": "The contact page of UpGrowth to send the user to.",
          "format": "uri"
        }
      },
      "description": "A call to action to relay to the user, in the language of the request."
    },
    "service_line": {
      "type": "object",
      "required": [
        "service",
        "text",
        "url"
      ],
      "properties": {
        "service": {
          "type": "string",
          "description": "The UpGrowth service the line is about: agrements, creation or demarches."
        },
        "text": {
          "type": "string",
          "description": "The line to pass on to the user: the starting price HT (19 % VAT on top) and the order link, in the language of the request."
        },
        "url": {
          "type": "string",
          "description": "The page to order from.",
          "format": "uri"
        }
      },
      "description": "Optional, REST only (not on MCP): present only for Algeria, on the answers of the activity codes (a regulated or free code), the creation legal forms and the start-up label support schemes."
    },
    "total": {
      "type": "integer",
      "description": "Number of results. Present on lists."
    },
    "limit": {
      "type": "integer",
      "description": "Page size used. Paginated lists only."
    },
    "offset": {
      "type": "integer",
      "description": "Results skipped. Paginated lists only."
    },
    "sommaire_years": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Journal Officiel search only: the years whose summaries are searched."
    },
    "free_years": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Calls with no key, Journal Officiel routes only: the years such a call may read."
    },
    "upgrade_note": {
      "type": "string",
      "description": "Calls with no key, Journal Officiel routes only: what a paid plan adds, its price and the trial."
    },
    "older_matches": {
      "description": "Calls with no key, full-text search without a year only: how many acts match in the older years that need a plan, a number or the string 'more than 1000'.",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ]
    },
    "truncated": {
      "type": "object",
      "required": [
        "returned"
      ],
      "properties": {
        "returned": {
          "type": "integer",
          "description": "Rows in this answer."
        },
        "total": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Rows that matched, null when unknown."
        }
      },
      "description": "Calls with no key only: present when the answer holds fewer rows than matched, because such a call gets at most 10 rows and cannot page."
    },
    "free_note": {
      "type": "string",
      "description": "Calls with no key only: says the list is not complete. Present with truncated."
    },
    "upgrade": {
      "type": "string",
      "description": "Calls with no key only: present when the answer is cut (truncated) or refused (403 key_required). One sentence, in the language of the request, with what a paid plan lifts and the cheapest price."
    },
    "upgrade_url": {
      "type": "string",
      "description": "Calls with no key only: present with upgrade. The page of the plans.",
      "format": "uri"
    },
    "status_note": {
      "type": "string",
      "description": "CNRC activity answers of Algeria and Morocco: what the statuses libre, reglementee, bloquee and not_determined mean, who gives them and what they do not prove."
    },
    "activity_list": {
      "type": "object",
      "description": "ANAE answers of Algeria and Tunisia: whether the list of activities is loaded, how many activities it holds (count), and in note where the list comes from and what it excludes.",
      "additionalProperties": true
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SourceRef"
      },
      "description": "Tunisian governorates and Moroccan regions only: every official page the list was read on."
    },
    "disclaimer": {
      "$ref": "#/$defs/Localized",
      "description": "Calculators only: the answer is an estimate from public texts, not tax or legal advice."
    }
  },
  "$defs": {
    "Localized": {
      "type": "object",
      "description": "The same text in the three languages of the site.",
      "properties": {
        "fr": {
          "type": "string"
        },
        "ar": {
          "type": "string"
        },
        "en": {
          "type": "string"
        }
      }
    },
    "SourceRef": {
      "type": "object",
      "required": [
        "url",
        "title",
        "retrieved"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "The official page the record was read on.",
          "format": "uri"
        },
        "title": {
          "type": "string",
          "description": "What the page is."
        },
        "retrieved": {
          "type": "string",
          "description": "The day the page was read, as YYYY-MM-DD."
        }
      }
    }
  }
}