Query Object

Specify a query to search documents in textpresso

Calls that require a query object must contain the following fields:

ANY query
Request JSON Object:
 
  • keywords (string) – (optional) the keywords to match in the text. Can contain logical operators AND and OR and grouping by round brackets
  • exclude_keywords (string) – (optional) the keywords to exclude. Can contain logical operators AND and OR and grouping by round brackets
  • year (string) – (optional) year of publication of the paper
  • author (string) – (optional) the author(s) of the paper
  • accession (string) – (optional) the accession of the paper
  • journal (string) – (optional) the journal where the paper has been published
  • paper_type (string) – (optional) the type of paper (e.g., research_article, review)
  • exact_match_author (bool) – (optional) apply exact match on the author field
  • exact_match_journal (bool) – (optional) apply exact match on the journal field
  • categories_and_ed (bool) – (optional) use AND logical operator between the provided categories
  • type (string) – the type of search to perform. Accepted values are: document to query the fulltext of documents and sentence to search in each sentence separately. Default value is document
  • case_sensitive (boolean) – whether to perform a case sensitive search. Default value is false
  • sort_by_year (boolean) – whether the results have to be sorted by publication date. Default value is false
Request JSON Array of Objects:
 
  • categories (string) – (optional) a set of categories to match in the text
  • corpora (string) – (optional) restrict the search to the specified list of corpora

Example:

{
  "query":
  {
    "keywords": "DYN-1",
    "type": "document",
    "case_sensitive": false,
    "sort_by_year": false,
    "corpora": [
                  "C. elegans",
                  "C. elegans Supplementals"
               ]
  }
}