Start free
Tools

Explore tools

Four tools to build a filtered dataset from the knowledge base, the same way Explore does in Studio, and download it.

Explore datasets come straight from the knowledge base, so they don't use credits. The dataset is saved to a project in Studio, where the user can open it, add columns, or set up monitoring. Explore the knowledge base

The order to call them in

  1. explore_get_filters to see the anchors, columns, filters, allowed values, and row limits.
  2. explore_search_filter_values for every term the user gave, like PD-1, NSCLC, or ADC. Pass the values it returns unchanged. If a term matches more than one value, ask the user which one.
  3. explore_build_dataset with the resolved filters. Show the user the counts and preview.
  4. Ask whether they want the full dataset. If they do, explore_download_dataset, as CSV unless they asked for JSON. Use this tool, not download_dataset_csv, for Explore datasets: its CSV matches a Studio export column for column.

explore_get_filters

List the dataset anchors (the kind of record each row is), the columns you can pick, the filters, their fixed allowed values, and the row limits. Call it before building a dataset.

No inputs.

explore_search_filter_values

Turn a user’s term into the canonical filter values Explore uses. Never guess IDs.

InputTypeNotes
category requiredstringThe filter category, from explore_get_filters
query requiredstringThe user’s term, such as "PD-1"
limitintegerDefault 20

explore_build_dataset

Build and save a dataset from resolved filter values. Returns counts, columns, a short preview, download handles, any row-cap warnings, and a link to the dataset in Studio.

InputTypeNotes
anchor requiredstringThe kind of record each row is, from explore_get_filters
filters requiredobjectFilter category to a list of values, each with the label and the entity_guid or entity_guids returned by explore_search_filter_values
columnsstring[]The columns to include. Omit for the defaults.
titlestringA name for the dataset
preview_rowsintegerDefault 5
generate_anywaybooleanDefault false. Set to true to build the dataset after a row-cap warning.

explore_download_dataset

Download the full saved dataset. CSV returns a short-lived download link with the same columns as a Studio export. JSON returns every row, which makes a large result for big datasets.

InputTypeNotes
project_id requiredstringFrom explore_build_dataset
dataset_id requiredstringFrom explore_build_dataset
formatstringcsv (default) or json