# list-saved-searches **Repository Path**: mirrors_sourcegraph/list-saved-searches ## Basic Information - **Project Name**: list-saved-searches - **Description**: Lists the number of saved searches associated with each username and organization on a Sourcegraph instance. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-23 - **Last Updated**: 2026-05-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README A short script to list users and organizations that have saved searches, and the number of saved searches associated with each user or org. **Note**: This script works for Sourcegraph instances before version 3.0.0. To run: 1. Clone this repository and `cd` into it. 1. Run `pipenv install` 1. Create a Sourcegraph access token at https://$YOUR_SOURCEGRAPH_INSTANCE_URL/users/$USERNAME/settings/tokens. The user associated with the token should be a site admin of the Sourcegraph instance you are querying. 1. Run `pipenv run python list-saved-searches.py https://$YOUR_SOURCEGRAPH_INSTANCE_URL $YOUR_SITE_ADMIN_ACCESS_TOKEN`. Running the script will output the users and organizations that have saved searches associated with them, and the number of saved searches associated with each: ``` Username # saved searches ---------- ------------------ beyang 2 ryan 1 sqs 2 felix 1 keegan 1 ijt 1 Org name # saved searches -------------------------- ------------------ Sourcegraph 1 ``` To only output users or orgs with multiple saved searches, add `--multiple` to the end of the command.