---
schema_version: "1"
id: 6acfef7e087fbaad9db8edb5225378f0860eae90a930e4478c2bd010d2cbae36
title: WITH SPELL_CORRECTION
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-soql-sosl/guides/soql-sosl/sforce-api-calls-sosl-with-spell-correction.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-sosl-with-spell-correction.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6309ca7bc5ca5bc72f96a0d5a54c580f9a6a59d95953056aff6709607f872738
products:
  - SOQL and SOSL Reference
  - Platform Developer Content
---

# WITH SPELL_CORRECTION

`WITH SPELL_CORRECTION` is an optional clause that can be added to a SOSL query. When set to `true`, spell correction is enabled for searches that support spell correction. When set to `false`, spell correction is not enabled. The default value is `true`. The `WITH SPELL_CORRECTION` clause can be used in API version 40 or later.

## Example

The following SOSL statement disables spell correction on a search of accounts for the term `San Francisco`.

```nolang
FIND {San Francisco} IN ALL FIELDS RETURNING Account WITH SPELL_CORRECTION = false
```

## Supported APIs

The `WITH SPELL_CORRECTION` clause in SOSL is supported in SOAP API, REST API, and Apex.

**See Also**

- [_Einstein Search Help_: Einstein Search Terms: Spelling Correction](https://help.salesforce.com/s/articleView?id=ai.search_glossary.htm&type=5)
