https://github.com/johnbean393/googlecustomsearch
A Swift Package to search Google with the Programmable Search Engine API.
https://github.com/johnbean393/googlecustomsearch
Last synced: 18 days ago
JSON representation
A Swift Package to search Google with the Programmable Search Engine API.
- Host: GitHub
- URL: https://github.com/johnbean393/googlecustomsearch
- Owner: johnbean393
- Created: 2024-10-16T00:07:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T00:19:07.000Z (almost 2 years ago)
- Last Synced: 2025-07-06T06:42:54.231Z (about 1 year ago)
- Language: Swift
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GoogleCustomSearch
A Swift Package to search Google with the Programmable Search Engine API.
## Usage
- Search
```
let query: String = "I have a stupid question"
let searchEngineId: String = "mySuperSecretSearchEngineId"
let apiKey: String = "mySuperSecretAPIKey"
do {
let response: GoogleSearchResponse = try await GoogleCustomSearch.search(
query: query,
searchEngineId: searchEngineId,
apiKey: apiKey,
resultNum: 5
)
print("results: \(response.items)")
} catch {
print("Error: \(error)")
}
```
## Installation
**Requirements**
- Xcode ≥ 15
**Swift Package Manager**
```
dependencies: [
.package(url: "https://github.com/johnbean393/GoogleCustomSearch", branch: "main")
]
```
## Contributing
Contributions are very welcome. Let's make ExtractKit-macOS simple and powerful.