---
schema_version: "1"
id: 65b88774eaae11b3621dc22297031724db1543343a75907c705974c43a99e9d4
title: Run Your Query
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/webconsole/guides/query-records/execute-query.md
canonical_url: https://developer.salesforce.com/docs/platform/webconsole/guide/execute-query.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 25c98eea258f5bd4e6eda3ef8df00cdf40d2fceae8d5f0ddba1f6d825bfb1ecf
products:
  - Web Console
  - salesforcedx
---
# Run Your Query

To run your query in the Salesforce Object Query Language (SOQL) Builder, click **Run Query**. The results appear in a grid format. You can save these results in a CSV or JSON format. The files are stored under the `<project-folder>/.sfdx/data` directory.

![Query results displays in SOQL Builder](https://developer.salesforce.com/docs/platform/media/shared/query_builder_running.png '{"class": "image-lg"}')

To run your query from a text editor:

1. Click the **Run Query** text above the query text.
2. Select one of these options depending on what your query does.
   - **REST API**: Performs operations on your org's data, such as creating an account or searching for contacts
   - **Tooling API**: Performs metadata and development-lifecycle tasks, such as getting test results or reading debug logs
3. The query results display in the output panel and a CSV file is created.

   ![Run Query option in a text editor is highlighted](https://developer.salesforce.com/docs/platform/media/shared/run_query_text2.png '{"class": "image-lg image-framed"}')

## Run Query From Command Palette

1. To run the entire query, open the Command Palette and type **SFDX: Execute SOQL Query with Current File**. If you want to run a portion of your query, select a part of the query and type **SFDX: Execute SOQL query with Currently Selected Text** in the Command Palette.
2. Select one of these options depending on what your query does.
   - **REST API**: Performs operations on your org's data, such as creating an account or searching for contacts
   - **Tooling API**: Performs metadata and development-lifecycle tasks, such as getting test results or reading debug logs
3. The query results display in the output panel and a CSV file is created.

