API

Provides programmable access to coded election programmes from the Manifesto Corpus and to the Manifesto Project's Main Dataset. The API returns JSON. All functions must provide a valid api_key parameter value.

Prerequisites

  • Manifesto Project Database Account (simply sign up on this webpage)
  • Manifesto Project Database API Key (simply login to your account, go to your profile page and generate an API key)

Functions

  • api_list_core_versions: list all core dataset versions
    • optional parameter: kind (can be "south_america" to get the south american datasets)
  • api_list_metadata_versions: list all corpus metadata versions
  • api_get_core: get core dataset
    • parameter: key (e.g. "key=MPDS2015a")
    • optional parameter: kind (can be dta, xlsx or sav); the binary content of these files is base64 encoded in the content-node of the json; depending on the availability of further application-version specific datasets on the download page (e.g. stata14 for MPDS2016a) you can also query these files (by using their names, which in the example would be stata14)
    • optional parameter: raw (can be true, all other values are treated as false); sends the file directly without wrapping in json
  • api_metadata: get corpus metadata for a list of parties in elections
    • parameter: keys (e.g. "keys[]=41320_200909&keys[]=41320_200509"); valid key values are provided by api_get_core, but you need to combine the party and the date column
    • parameter: version (e.g. "version=version"); valid values are provided by api_list_metadata_versions
  • api_texts_and_annotations: get texts and annotations of the coded manifestos:
    • parameter: keys (e.g. keys[]=41320_2009); valid key values are provided by the manifesto_id properties of api_metadata responses (hint: this key value returned by api_metadata can be different to the key initially used to query api_metadata)
    • parameter: version (e.g. "version=version"); valid values are provided by api_list_metadata_versions
  • api_get_core_citation: get citation for core dataset
    • parameter: key (e.g. "key=MPDS2015a")
  • api_get_corpus_citation: get citation for corpus dataset
    • parameter: key (e.g. "key=2015-3")

Access

All functions are rooted below https://manifesto-project.wzb.eu/tools/ and have the file extension json attached.

Examples

  • https://manifesto-project.wzb.eu/tools/api_list_core_versions.json?api_key=<api_key>