{"id":30880209,"url":"https://github.com/workingdog/nominatimswift","last_synced_at":"2025-09-08T06:48:39.888Z","repository":{"id":310838187,"uuid":"1041420322","full_name":"workingDog/NominatimSwift","owner":"workingDog","description":"Nominatim API Swift client library","archived":false,"fork":false,"pushed_at":"2025-08-28T07:18:41.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T14:20:18.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workingDog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-20T13:10:50.000Z","updated_at":"2025-08-28T07:18:45.000Z","dependencies_parsed_at":"2025-08-20T15:41:53.680Z","dependency_job_id":null,"html_url":"https://github.com/workingDog/NominatimSwift","commit_stats":null,"previous_names":["workingdog/nominatimswift"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/workingDog/NominatimSwift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workingDog%2FNominatimSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workingDog%2FNominatimSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workingDog%2FNominatimSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workingDog%2FNominatimSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workingDog","download_url":"https://codeload.github.com/workingDog/NominatimSwift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workingDog%2FNominatimSwift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274146707,"owners_count":25230116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-08T06:48:38.181Z","updated_at":"2025-09-08T06:48:39.876Z","avatar_url":"https://github.com/workingDog.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nominatim data API Swift client library\n\n[Nominatim](https://nominatim.org/release-docs/develop/) is a tool to search OpenStreetMap (OSM) data by name and address and to generate synthetic addresses of OSM points (reverse geocoding).\n\n**NominatimSwift** is a small Swift library to connect to the [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/) server.\n        \n**NominatimSwift** caters for JSON responses.\n          \n                                                                    \n### Usage\n\n**NominatimSwift** is made easy to use with **SwiftUI**.\nIt can be used with the following OS:\n\n- iOS 17.0+\n- iPadOS 17.0+\n- macOS 14.0+\n- Mac Catalyst 17.0+\n\n#### Examples\n\n[Nominatim](https://nominatim.org/release-docs/develop/api/Overview/) data can be accessed through the use of a **NomiJsonProvider**, with simple functions.\n\n```swift\nlet dataProvider = NomiJsonProvider()\n\n// using the Swift async/await concurrency, eg in `.task{...}`\n    do {\n        let place: NominatimPlace = try await dataProvider.reverse(lat: 35.6768601, lon: 139.7638947, options: NomiOptions())\n        print(place)\n    } catch {\n        print(error)\n    }\n    \n    \n// or using the callback style, eg in `.onAppear {...}`\n    dataProvider.reverse(lat: 35.6768601, lon: 139.7638947, options: NomiOptions()) { result in\n           print(result)\n    }\n\n\n```\n\n#### SwiftUI data model\n\nUsing the @Observable data model **NomiDataJsonModel**\n\n\n```swift\nimport SwiftUI\nimport MapKit\nimport NominatimSwift\n\n            struct ContentView: View {\n                let dataModel = NomiDataJsonModel()\n\n                var body: some View {\n                    VStack {\n                        if dataModel.isLoading {\n                            ProgressView()\n                        }\n                        Map {\n                            ForEach(dataModel.searchResults) { place in\n                                if let coord = place.coordinate2D() {\n                                    Marker(place.displayName, systemImage: \"globe\", coordinate: coord)\n                                }\n                            }\n                        }\n                    }\n                    .task {\n                        dataModel.isLoading = true\n                        await dataModel.search(address: \"Sydney, Australia\", options: NomiOptions())\n                        dataModel.isLoading = false\n                    }\n                }\n                \n            }\n```\n\n\nFor bulk parallel processing, use **NomiBatchJsonModel** for JSON geocoding in batch mode.\n\n\n### Options\n\nOptions available:\n\nSee **NomiOptions**\n            \n-   see [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/) for all the optional parameters available.\n\n### Installation\n\nInclude the files in the **./Sources/NominatimSwift** folder into your project or preferably use **Swift Package Manager**.\n\n#### Swift Package Manager (SPM)\n\nCreate a Package.swift file for your project and add a dependency to:\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/workingDog/NominatimSwift.git\", branch: \"main\")\n]\n```\n\n#### Using Xcode\n\n    Select your project \u003e Swift Packages \u003e Add Package Dependency...\n    https://github.com/workingDog/NominatimSwift.git\n\nThen in your code:\n\n```swift\nimport NominatimSwift\n```\n    \n### References\n\n-    [Nominatim](https://nominatim.org/release-docs/develop/api/Overview/)\n\n### License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkingdog%2Fnominatimswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkingdog%2Fnominatimswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkingdog%2Fnominatimswift/lists"}