---
title: "Search datasets"
method: GET
path: "/package_search"
tags: ["Catalog"]
---

# Search datasets

`GET /package_search`

Search for datasets (packages) using Solr query syntax. Supports filtering, faceting, sorting, and pagination. No authentication required for public data.

Pass parameters as query string arguments (GET) or as a JSON body (POST).

## Query parameters

- `q` string, nullable
- `fq` string, nullable
- `fq_list` string[], nullable
- `sort` string, nullable
- `rows` integer, nullable
- `start` integer, nullable
- `facet` string, nullable
- `facet.mincount` integer, nullable
- `facet.limit` integer, nullable
- `facet.field` string[], nullable
- `include_drafts` boolean, nullable
- `include_deleted` boolean, nullable
- `include_private` boolean, nullable
- `use_default_schema` boolean, nullable

## Response `200`

Successful response.

- PackageSearchResponse
  - `help` string, required — URL to the API documentation for this action.
  - `success` boolean, required — Whether the request succeeded.
  - `result` PackageSearchResult, required
    - `count` integer, required — Total number of datasets matching the query.
    - `results` object[], required — List of matching dataset objects.
    - `sort` string, nullable — Sort string echoed from the request.
    - `facets` object, nullable — Legacy facet counts. Prefer `search_facets`.
    - `search_facets` object, required — Facet counts keyed by field name. Each entry has a `title` and an `items` list of `{name, display_name, count}` objects.
    - `facet_pivot` object, nullable — Pivot facet results, if requested.
    - `facet_queries` object, nullable — Facet query results, if requested.
    - `expanded` object, nullable — Expanded results, if requested.

## Other responses

- `403` — Forbidden — API token is missing or invalid. Authentication is required for all DataStore requests, including public resources.
- `404` — Not Found — the requested action or endpoint does not exist.
- `409` — Conflict — Validation Error. The request parameters or SQL were invalid (e.g. missing required parameter, non-SELECT SQL, malformed query, or wrong parameter type).
- `429` — Too Many Requests — rate limit exceeded.
- `500` — Internal Server Error — unexpected server-side failure.

---

[API](https://skmtc.dev/humdata/apis/hdx-apis.md) · [All operations](https://skmtc.dev/humdata/apis/hdx-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/humdata/hdx-apis/revisions/cc1970bc392c/schema)
