---
title: CSSearchQueryError.Code.invalidQuery
framework: Core Spotlight
role: symbol
role_heading: Case
platforms: [iOS 10.0+, iPadOS 10.0+, Mac Catalyst 13.1+, macOS 10.12+, visionOS 1.0+]
path: corespotlight/cssearchqueryerror/code/invalidquery
---

# CSSearchQueryError.Code.invalidQuery

The query is syntactically invalid or specifies items that your app doesn’t have access to.

## Declaration

```swift
case invalidQuery
```

## See Also

### Getting the error codes

- [CSSearchQueryError.Code.cancelled](corespotlight/cssearchqueryerror/code/cancelled.md)
- [CSSearchQueryError.Code.indexUnreachable](corespotlight/cssearchqueryerror/code/indexunreachable.md)
- [CSSearchQueryError.Code.unknown](corespotlight/cssearchqueryerror/code/unknown.md)
