API v2
The API can be accessed at /api/v2 and supports JSON and XML as output format. The XML is generated from the JSON using
the bijective XPath 3.1 transformation json-to-xml. If an end point also supports HTML output, the HTML is generated from the XML using
the same XSLT transformations as in the main web search interface.
Contents
Common parameters for all end points
format=quality-values-listThe output format the response should have in a preference-ordered list using quality values syntax. Can also be specified using theAcceptHTTP header (but this parameter takes precedence). Also allows for specifying just the second part of the MIME type, e.g.:json, in which case a*/is pre-pended automatically. The default isjson.locale=quality-values-listThe locale the response should have in a preference-ordered list using quality values syntax Can also be specified using theAccept-LanguageHTTP header (but this parameter takes precedence). Only relevant for HTML output. Onlyen(English) is supported at the moment, which is also the default.fields=names-listThe fields/attributes of the result list to show, separated by commata (,). If set, all other fields will not be sent back to the client, which can considerably reduce the message size. Only available for JSON and XML output.
Get arguments
GET /api/v2/arguments
Uses the same parameters as the usual args.me search.html: for example, /search.html?query=art&pageLayout=pro-con corresponds to /api/v2/arguments?query=art&pageLayout=pro-con. Supports JSON, XML, and HTML as output format.
query=textSpecifies the query for which arguments should be retrieved. Use double quotes("")for phrase queries and plus signs(+)between words to form multiple-word queries.aspectRanks=criteriaRestricts the retrieved arguments to those that fulfill all of given comma-separated aspect rank critera. An aspect rank criterium is one of-
A single aspect rank predicate: either
aspect,aspect < rank, oraspect <= rank, where aspect is the name of the aspect whose rank should be tested, and rank is the rank value (starting with 1 for top-ranked) to test against. If only the name of the aspect is given, it is just tested whether the argument has the aspect at all. In all cases a rank predicate requires the argument to have the respective aspect. -
A conjunction:
ALL(criteria), where criteria is a list of comma-separated aspect rank criteria where the argument has to fulfill all of them to fulfill the conjunction. -
A disjunction:
ANY(criteria), where criteria is a list of comma-separated aspect rank criteria where the argument has to fulfill at least one of them to fulfill the disjunction.
ignoredAspects. Those ignored aspects will be treated as if the argument would not have that aspect for the matter of fulfilling aspect rank criteria.-
A single aspect rank predicate: either
aspectSpace=parametersSpecifies the parameters that are used to retrieve the arguments from which the aspect space is created. The parameters have to be URI component encoded (in addition to the usual encoding for get parameters: the same encoding function has to be applied here). Example: "query%3Drights%26mode%3Dall" (which decodes to "query=rights&mode=all"). The specified aspect space is used byaspectSpacePolygonto determine the Cartesian coordinates of arguments. Also, specifying this parameter will add coordinates of each retrieved argument in the aspect space to the argument's context attributes.aspectSpacePolygon=polygonRestricts the retrieved arguments to those that fall inside the given polygon for some aspect space, where polygon is a space-separated list of the coordinates (x,y, where both x and y are in the interval [-1;1]) of the polygon's points in the Cartesian coordinate system that corresponds to the barycentric aspect space. This parameter requires to specify the aspect space usingaspectSpace.corpora=nameRestricts the retrieved arguments to those that are part of a corpus in the given comma-separated list. Note that, in a few cases, arguments of the corpus may no longer be retrievable (filtered out for various reasons) or be changed (e.g., cleaned of formatting and boilerplate texts like "thank you for this discussion"). Moreover, since we frequently extend (and sometimes change) the context attributes, the JSON of the arguments will likely be different from that of the corpus. Available values:args-me-2020-04-01.ids=id-listRestricts the retrieved arguments to those with IDs in the given comma-separated list.ignoredAspects=aspectsSpecifies aspects to ignore when restricting the retrieved arguments byaspectRanks.mode=nameRestricts the retrieved arguments to those with the given mode. Available values:all,discussion,person.page=numberSpecifies the page of the result list to show (starting with 1). If both this andpageOffsetare specified,pagetakes precedence. The number of arguments on the page can be specified throughpageSize. Default: 1 (first page).pageLayout=nameSpecifies the layout of the result page (called view in the graphical user interface). Currently supported values arepro-conandone-column(the default).pageOffset=offsetSpecifies the index in the result list of the first argument to show (starting with 0). If both this anpageare specified,pagetakes precedence. The number of arguments on the page can be specified throughpageSize. Default: 0 (first argument).pageSize=sizeSpecifies the number of arguments the response can contain. The page offset can be specified throughpageor directly throughpageSize. Default: 10; Minimum: 1; Maximum: 1000.sourceDomain=nameRestricts the retrieved arguments to those that stem form a domain in the given comma-separated list. Available values:canadian-parliament,debatepedia,debatewise,debate.org,idebate.
Response
{
"query": {
"text":"text",
"properties":{
"key":"value", ...
},
"start":"timestamp"
},
"arguments":[
{
"id":"id",
"conclusion":"text",
"premises":[
{
"text":"text",
"stance":"stance-towards-conclusion: PRO or CON",
"annotations":[
{
"type":"java-class",
"start":"character-offset",
"end":"character-offset",
"source":"java-class, url, or other identifier"
}, ...
]
}, ...
],
"context":{
"key":"value", ...
},
"summary":"text",
"explanation":{
"score":score,
"name":score-name,
"details":[
{ explanation }, ...
]
},
"stance":"stance-towards-query: PRO or CON"
}, ...
],
"totalSize":number-of-matching-arguments-in-index,
"resultsBefore":number-of-arguments-on-previous-pages,
"retrievalTimeInMilliseconds":milliseconds-between-query-parsing-and-result-presentation
}
Get argument
GET /api/v2/arguments/idThis end point offers no additional parameters. Supports JSON and XML as output format.
Response
{
"id":"id",
"conclusion":"text",
"premises":[
{
"text":"text",
"stance":"stance-towards-conclusion: PRO or CON",
"annotations":[
{
"type":"java-class",
"start":"character-offset",
"end":"character-offset"
}, ...
]
}, ...
],
"context":{
"key":"value", ...
}
}
Get aspect space
GET /api/v2/aspectSpace
The same parameters as for GET /api/v2/arguments apply. The aspect space is created from the arguments that are retrieved using these
parameters. In addition, the following parameters are available to modify the way
the aspect space is created. Supports JSON and XML as output format.
ignoreQueryTermDimensions=booleanSpecifies whether to ignore all aspects that are also query terms. This setting avoids to have an aspect that naturally every argument has. Default:true.mergeToOther=booleanSpecifies that, if more thannumDimensionsaspects are found in the retrieved arguments, the firstnumDimensions - 1aspects are represented as an dimension each, whereas all others are represented by a single dimension (the last one). If the value of this parameter isfalse, instead the firstnumDimensionsaspects are represented as an dimension each and all others are discarded. Default:true.numDimensions=amountSpecifies the number of dimensions the created aspect space will have at most. If more aspects than the specified number of dimensions are found in the retrieved arguments,mergeToOtherspecifies how this situation is handled.
Response
{
"dimensions":[
{
"aspects":["name", ...],
"weight":normalized-sum-of-weights-from-arguments,
"index":non-negative-integer,
"cartesianX":X-coordinate-of-this-dimension-in-an-cartesian-system in [-1;1],
"cartesianY":Y-coordinate-of-this-dimension-in-an-cartesian-system in [-1;1]
}, ...
],
"ignoredAspects":[ "aspects-ignored-due-to-query-terms", ... ]
}
Get pro/con counts
GET /api/v2/counts
Uses the same parameters as get arguments. Supports JSON and XML as output format.
Response
{
"byFilter":{
"context-key1":{
"context-value1":{
"pro":"amount",
"con":"amount",
}, ...
}, ...
},
"total":{
"pro":"amount",
"con":"amount",
}
}
Back to main page