# package_search Parameters.
ckan default help for package_search, ** [ help_show?name=package_search](https://catalogue.data.govt.nz/api/3/action/help_show?name=package_search)**
**The following search parameters are available. **
### q: (string) the query.
> Optional. Default: `*:*` which returns everything.
> **Example:** *q=flood* datasets containing the word 'flood', 'floods' or 'flooding'
---
### fq: (string) [Filter Query Parameter](https://solr.apache.org/guide/6_6/common-query-parameters.html#CommonQueryParameters-Thefq_FilterQuery_Parameter).
**string** is '*key:value*'
The fq parameter can be specified multiple times in a query. Documents will only be included in the result if they are in the intersection of the document sets resulting from each instance of the parameter.
> **Example:** *fq=tags:economy*
datasets with the tag "economy".
In the example below, only documents which have a *metadata_created* between 2017-04-12T00:00:00Z and 2017-06-30T23:59:99.999Z are returned:
> **Example:** *fq=metadata_created:[2017-04-12T00:00:00Z TO 2017-06-30T23:59:99.999Z]&q=energy*
This examples results are for documents issues from 2020-01-12 to present date.
> **Example:** *fq=issued:[2020-01-12 TO *]&q=energy*
Filter queries can involve complicated Boolean queries.
the below example has two conditional filters in the *fq*,
the **+** sets the filter to include documents in the issued date range.
the **-** sets the filter to excluded documents with the *name* electricity-market-information
> **Example:** *fq=**+**issued:[2020-01-12 TO *]**-**name:electricity-market-information&q=energy*
---
### sort: (string) sorting of the search results.
If the sort parameter is omitted, sorting is performed as though the parameter were set to score desc.
Optional. Default: *'relevance asc, metadata_modified desc'*. ????
A comma-separated string of *key* and sort direction: *asc* or *desc* (default)
> space or %20 is the separator between key and direction.
sort=key direction,key%20direction]
> **Example:** *?sort=relevance asc,metadata_modified desc*
---
### rows: (int) the number of matching rows to return.
There is a hard limit of 1000 datasets per query.
---
### start: (int) the offset in the complete result for where the set of returned datasets should begin.
---
## Results:
The result of this action is a dictionary returned with the following keys:
* **count** (int) the number of results found.
Note, this is the total number of results found, not the total number of results returned
(which is affected by limit and row parameters used in the input).
* **results** (list of dictized datasets.) ordered list of datasets matching the query, where the ordering defined by the sort parameter used in the query.
Each entry of the outer dictionary is itself a dictionary, with a "*title*" key, and an "*items*" key.
The "*items*" key's value is a list of dicts, each with "*count*", "*display_name*" and "*name*" entries.
The *display_name* is a form of the name that can be used in titles.
**An example result:**
I don't think that data.govt.nz uses *facets / search_facets*
>> ~~~js
{count: 2,
sort: "score desc, metadata_modified desc",
facets: Object {},
results: Array(2)[ { result }, { result }],
search_facets: Object {}
}
~~~