{
  "success": {
    "v": 1,
    "description": "Find and retreive text snippets in articles that contain the provided search term(s)/phrase(s). Searches are conducted over the full-text content of articles.",
    "options": {
      "parameters": {
        "term": "Required. Term(s)/phrase(s) to find in document full-texts. Separate multiple terms/phrases with commas. Term strings must be URL-encoded. Use a '*' for wildcard matching (e.g., 'term=ACE*' will match 'ACE','ACE2', and 'term=an*gen' will match 'androgen','antigen'; wildcards must be accompanied by at least 3 alphanumeric characters and cannot begin search strings or be used in phrases).",
        "case_sensitive": "Optional. When this parameter is included (no value needed), case sensitivity is used when matching terms. Default behavior is to match terms with no case sensitivity.",
        "no_word_stemming": "If true, do not apply word stemming to search term (default: stem terms such that a search for 'stromatolite' is reduced to 'stromatolit*' and matches ['stromatolites', 'stromatolitic', 'stromoatolite'])",
        "inclusive": "Optional. When this parameter is included (no value needed), then all comma-separated terms must co-occur in the same document. Default behavior is to show results for documents containing one or more of the search terms/phrases.",
        "document_filter_terms": "Additional term(s) to require within the document.",
        "publisher": "Optional. Restrict results to a specified publisher/source of publication (e.g. USGS). Default is to include results from all publishers/sources (see API route /publishers?all). Only one publisher can be specified at a time.",
        "docid": "Optional. Internal document ID. When provided, limits search to the specified document(s). Separate multiple docid values with commas.",
        "doi": "Optional. Global Digital Object Identifier. When provided, limits search to the specified document(s). Separate multiple doi values with commas.",
        "min_acquired": "Optional. Restrict results to documents added to corpus since the date specified. Can be an ISO compliant string or a range relative to time of request (e.g. 'min_acquired=24h' to restrict results to documents acquired in the previous 24 hours). Possible values: y (year), M (months), w (weeks), d (days), h/H (hours), m (minutes), s (seconds)",
        "max_acquired": "Optional. Restrict results to documents added to corpus before the date specified. Can either be a ISO compliant string or a simple range compared to now (e.g. '24h' for the previous 24 hours). Possible parameters: y (year), M (months), w (weeks), d (days), h/H (hours), m (minutes), s (seconds)",
        "min_published": "Optional. Require publication date to be anytime since the date specified (inclusive). Must be an ISO compliant string (e.g., 2020-01). NOTE: that only year and month are used in filtering and that many journals release publications in advance of their cover published date, meaning that a specified date in the future might return results.",
        "max_published": "Optional. Require publication date to be anytime prior to the specified date. Must be an ISO compliant string (e.g., 2020-01-01). NOTE: only year and month are used in filtering.",
        "pubname": "Publication name (exact match)",
        "pubname_like": "Publication name (partial match -- all publications containing that string will be included)",
        "clean": "Optional. When this parameter is included (no value required), results are returned without any html tags around the specified search term(s); the default response encloses all search term hits in html em class='hl' tags.",
        "full_results": "Optional. When this parameter is included (no value required), the total number of matching documents is returned, along with a scan-and-scroll cursor that allows all results to be retrieved page-by-page; default behavior is to restrict response size to first 10 matching documents and to limit highlights for search terms to 5 per document.",
        "per_page": "Maximum number of results to include in one response. Applies to full_results pagination or single-page requests. NOTE: Due to internal mechanisms, actual number of results will be this parameter, floor rounded to a multiple of 25.",
        "article_limit": "Optional. Integer, the maximum number of articles to return. Defaults to 10.",
        "fragment_limit": "Optional. Integer, the maximum number of term text fragments to return for each document. Defaults to 5.",
        "dataset": "Filter the results to a predefined dataset (see /sets route for availability and definitions (alternate to set parameter)",
        "dict_filter": "Filter the results to documents which include at least one term from the specified dictionary.",
        "dictid_filter": "Filter the results to documents which include at least one term from the specified dictionary (by ID).",
        "set": "Filter the results to a predefined dataset (see /sets route for availability and definitions (alternate to dataset parameter)",
        "corpus": "Restrict (or expand) the results to one or more of xDD's corpora. By default, results include only xDD's fulltext holdings. Additional optios include 'pubmed_abstracts' or 'all'.",
        "known_terms": "If true, include summary of known terms indexed within xDD, grouped by dictionary. Also accepts a comma-separated list of dictionary names to filter.",
        "dict": "Include known terms summary for specified dictionaries for each result. Comma-separated list of dictionary names.",
        "dict_id": "Include known terms summary for specified dictionaries for each result. Comma-separated list of dictionary IDs.",
        "known_entities": "Include known entities extracted via external tools. Current options: [drugs, emmaa, stratname_candidates, openie].",
        "include_score": "Include the search query score for each document. NOTE: scores will be zero for filtration-type queries. Scores are only meaningful with doing term-based query.",
        "match": "If true, utilizes a \"match\" instead of a \"match_phrase\" query within Elaticsearch. This has the effect of finding documents which most frequently use the individial terms in the query, rather than looking for the exact phrase."
      },
      "output_formats": [
        "json"
      ],
      "examples": [
        "/api/snippets?term=Gea&docid=5b6fc5f5cf58f186e24c169a",
        "/api/snippets?term=Baraboo%20Quartzite,Wisconsin&inclusive",
        "/api/snippets?term=Chile&publisher=Elsevier&clean",
        "/api/snippets?term=embryonic%20stem%20cell&full_results",
        "/api/snippets?term=science&min_acquired=24h",
        "/api/snippets?term=COVID*&full_results&min_published=2020",
        "/api/snippets?term=COVID-19&doi=10.1016/S0140-6736(20)30493-1,10.1101/2020.03.25.008805",
        "/api/snippets?term=efficacy&source=bioRxiv&known_entities=drugs"
      ],
      "fields": {
        "pubname": "The name of the journal in which the article was published",
        "publisher": "Publisher (or primary source) of the article (e.g. Elsevier, USGS)",
        "title": "Article title",
        "coverDate": "The data of publication of the article",
        "URL": "Link to the article",
        "doi": "The article's Digitial Object Identifier",
        "authors": "An array of objects, each containing a key 'name' and a value equal to the name of one author",
        "highlight": "An array of strings that include the search term. When lacking 'clean' parameter, term(s) will be wrapped in HTML <em> tags with the class 'hl'",
        "_gddid": "Unique internal ID for the document",
        "hits": "Total number of objects identified in the response"
      }
    },
    "license": "https://creativecommons.org/licenses/by-nc/2.0/"
  }
}