Pouls · Schema

PollsContract

CompanyPollingFrenchElectionsData

Properties

Name Type Description
version integer Version du contrat, actuellement 1. Les champs additifs ne changent pas cette version ; une nouvelle valeur signale un changement incompatible.
updatedAt string Horodatage de génération des données ; ne désigne pas la date de terrain du dernier sondage.
source object
window object
sondages array Moyennes pondérées de premier tour, triées par score décroissant, toutes hypothèses confondues.
tendance array
recentPolls array Sondages récents de premier tour : une entrée par hypothèse testée, pas par enquête indépendante.
duels array Face-à-face de second tour réellement mesurés, sans projection.
candidats array Tous les candidats déjà testés au premier tour, dans la moyenne ou non, par ordre alphabétique. Résultats bruts uniquement : aucune moyenne pour un candidat hors de `sondages`.
latestPollId stringnull Identifiant du dernier sondage, ou null si aucun sondage n'est disponible.
newPolls array Identifiants apparus depuis la génération précédente du contrat ; pas un diff propre à chaque client.
View JSON Schema on GitHub

JSON Schema

pouls-app-polls-contract-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pouls-app/json-schema/pouls-app-polls-contract-schema.json",
  "title": "PollsContract",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pouls-app-openapi.json#/components/schemas/PollsContract",
  "type": "object",
  "properties": {
    "version": {
      "type": "integer",
      "minimum": 1,
      "description": "Version du contrat, actuellement 1. Les champs additifs ne changent pas cette version ; une nouvelle valeur signale un changement incompatible."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Horodatage de génération des données ; ne désigne pas la date de terrain du dernier sondage."
    },
    "source": {
      "$ref": "#/$defs/SourceMeta"
    },
    "window": {
      "$ref": "#/$defs/WindowMeta"
    },
    "sondages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SondageEntry"
      },
      "description": "Moyennes pondérées de premier tour, triées par score décroissant, toutes hypothèses confondues."
    },
    "tendance": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TrendSeries"
      }
    },
    "recentPolls": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PollDetail"
      },
      "description": "Sondages récents de premier tour : une entrée par hypothèse testée, pas par enquête indépendante."
    },
    "duels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DuelEntry"
      },
      "description": "Face-à-face de second tour réellement mesurés, sans projection."
    },
    "candidats": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CandidateRecord"
      },
      "description": "Tous les candidats déjà testés au premier tour, dans la moyenne ou non, par ordre alphabétique. Résultats bruts uniquement : aucune moyenne pour un candidat hors de `sondages`."
    },
    "latestPollId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identifiant du dernier sondage, ou null si aucun sondage n'est disponible."
    },
    "newPolls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Identifiants apparus depuis la génération précédente du contrat ; pas un diff propre à chaque client."
    }
  },
  "required": [
    "version",
    "updatedAt",
    "source",
    "window",
    "sondages",
    "tendance",
    "recentPolls",
    "duels",
    "candidats",
    "latestPollId",
    "newPolls"
  ],
  "$defs": {
    "CandidateRecord": {
      "type": "object",
      "properties": {
        "candidatId": {
          "type": "string"
        },
        "candidat": {
          "type": "string"
        },
        "parti": {
          "type": "string",
          "description": "Parti indiqué par le flux dans le dernier sondage ; chaîne vide si absent."
        },
        "famille": {
          "type": "string"
        },
        "couleur": {
          "type": "string"
        },
        "retrait": {
          "type": "string",
          "format": "date",
          "description": "Date de retrait de candidature indiquée par le flux ; absent sinon."
        },
        "nPolls": {
          "type": "integer",
          "minimum": 0,
          "description": "Sondages distincts (institut et dates de terrain) où le candidat a été testé depuis le début du flux, hypothèses dédupliquées."
        },
        "firstFin": {
          "type": "string",
          "format": "date"
        },
        "lastFin": {
          "type": "string",
          "format": "date"
        },
        "resultats": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CandidateResult"
          },
          "description": "Derniers résultats bruts, une entrée par hypothèse, du plus récent au plus ancien : toutes les hypothèses du dernier terrain, puis les précédentes jusqu'à 5 entrées. Pas l'historique complet."
        }
      },
      "required": [
        "candidatId",
        "candidat",
        "parti",
        "famille",
        "couleur",
        "nPolls",
        "firstFin",
        "lastFin",
        "resultats"
      ]
    },
    "CandidateResult": {
      "type": "object",
      "properties": {
        "pollId": {
          "type": "string",
          "description": "Identifiant de l'hypothèse, comme `PollDetail.pollId`."
        },
        "institut": {
          "type": "string"
        },
        "commanditaire": {
          "type": "string"
        },
        "debut": {
          "type": "string",
          "format": "date"
        },
        "fin": {
          "type": "string",
          "format": "date"
        },
        "intentions": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Intention brute publiée pour cette hypothèse, pas une moyenne."
        },
        "marge": {
          "type": "number",
          "minimum": 0,
          "description": "Marge ± en points pour ce candidat dans ce sondage individuel."
        }
      },
      "required": [
        "pollId",
        "institut",
        "commanditaire",
        "debut",
        "fin",
        "intentions",
        "marge"
      ]
    },
    "DuelEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "a": {
          "$ref": "#/$defs/DuelSide"
        },
        "b": {
          "$ref": "#/$defs/DuelSide"
        },
        "nPolls": {
          "type": "integer",
          "minimum": 0
        },
        "lastFin": {
          "type": "string",
          "format": "date"
        },
        "instituts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "id",
        "a",
        "b",
        "nPolls",
        "lastFin",
        "instituts"
      ]
    },
    "DuelSide": {
      "type": "object",
      "properties": {
        "candidatId": {
          "type": "string"
        },
        "candidat": {
          "type": "string"
        },
        "couleur": {
          "type": "string"
        },
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "marge": {
          "type": "number",
          "minimum": 0,
          "description": "Marge ± en points de pourcentage. Celle d'un sondage typique, pas d'un échantillon cumulé."
        }
      },
      "required": [
        "candidatId",
        "candidat",
        "couleur",
        "score",
        "marge"
      ]
    },
    "PollCandidate": {
      "type": "object",
      "properties": {
        "candidatId": {
          "type": "string"
        },
        "candidat": {
          "type": "string"
        },
        "couleur": {
          "type": "string"
        },
        "intentions": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "marge": {
          "type": "number",
          "minimum": 0,
          "description": "Marge ± en points pour ce candidat dans ce sondage individuel."
        }
      },
      "required": [
        "candidatId",
        "candidat",
        "couleur",
        "intentions",
        "marge"
      ]
    },
    "PollDetail": {
      "type": "object",
      "properties": {
        "pollId": {
          "type": "string"
        },
        "institut": {
          "type": "string"
        },
        "commanditaire": {
          "type": "string"
        },
        "debut": {
          "type": "string",
          "format": "date"
        },
        "fin": {
          "type": "string",
          "format": "date"
        },
        "echantillon": {
          "type": "integer",
          "minimum": 0
        },
        "population": {
          "type": "string"
        },
        "hypothese": {
          "type": "string"
        },
        "tour": {
          "type": "string"
        },
        "candidats": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PollCandidate"
          }
        }
      },
      "required": [
        "pollId",
        "institut",
        "commanditaire",
        "debut",
        "fin",
        "echantillon",
        "population",
        "hypothese",
        "tour",
        "candidats"
      ]
    },
    "SondageEntry": {
      "type": "object",
      "properties": {
        "candidatId": {
          "type": "string"
        },
        "candidat": {
          "type": "string"
        },
        "parti": {
          "type": "string"
        },
        "famille": {
          "type": "string"
        },
        "couleur": {
          "type": "string"
        },
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "marge": {
          "type": "number",
          "minimum": 0,
          "description": "Marge ± en points de pourcentage. Celle d'un sondage typique, pas d'un échantillon cumulé."
        },
        "tendance": {
          "type": "string",
          "enum": [
            "up",
            "down",
            "stable"
          ],
          "description": "Hausse/baisse si la variation dépasse la marge ; stable sinon."
        },
        "delta": {
          "type": "number",
          "description": "Variation en points face à la fenêtre précédente. Une variation dans la marge n'est pas significative."
        },
        "nPolls": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "candidatId",
        "candidat",
        "parti",
        "famille",
        "couleur",
        "score",
        "marge",
        "tendance",
        "delta",
        "nPolls"
      ]
    },
    "SourceMeta": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "credit": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "url",
        "credit"
      ]
    },
    "TrendPoint": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "value": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Moyenne glissante qu'aurait affichée Pouls à cette date."
        },
        "nPolls": {
          "type": "integer",
          "minimum": 0,
          "description": "Nouveaux sondages du bucket, pas nombre de sondages de la moyenne glissante."
        },
        "marge": {
          "type": "number",
          "minimum": 0,
          "description": "Marge ± en points de pourcentage. Celle d'un sondage typique, pas d'un échantillon cumulé."
        }
      },
      "required": [
        "date",
        "value"
      ]
    },
    "TrendSeries": {
      "type": "object",
      "properties": {
        "candidatId": {
          "type": "string"
        },
        "candidat": {
          "type": "string"
        },
        "couleur": {
          "type": "string"
        },
        "points": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TrendPoint"
          }
        }
      },
      "required": [
        "candidatId",
        "candidat",
        "couleur",
        "points"
      ]
    },
    "WindowMeta": {
      "type": "object",
      "properties": {
        "days": {
          "type": "integer",
          "minimum": 0,
          "description": "Fenêtre glissante de premier tour, élargie si la densité des sondages est insuffisante."
        },
        "nPolls": {
          "type": "integer",
          "minimum": 0,
          "description": "Nombre de sondages distincts de la fenêtre, après déduplication des hypothèses."
        },
        "instituts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "days",
        "nPolls",
        "instituts",
        "from",
        "to"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/pouls-app-polls-contract"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.