ApiKit is a Swift SDK that helps you integrate with external REST APIs.

What's New


✨ New Features

  • ApiKit now supports visionOS.

💥 Breaking changes

  • SystemNotification now requires Swift 5.9.

ApiKit Logo

Version Swift 5.9 MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About ApiKit

ApiKit is a Swift SDK that helps you integrate with external REST APIs.

ApiKit has lightweight ApiEnvironment and ApiRoute protocols that make it easy to model any REST-based API. It also has an ApiRequest that can define a route and response type for even easier use.

Once you have an environment and routes, you can use a regular URLSession or a custom ApiClient to fetch any route or request from any environment.


ApiKit can be installed with the Swift Package Manager:


Getting Started

You can use ApiEnvironments and ApiRoutes to model any API, and create Codable models that automatically map response data from the API.

Once you have created your API-specific types, you can use a plain URLSession or any custom ApiClient to fetch data.

let client = URLSession.shared
let environment = YelpEnvironment.v3(apiToken: "TOKEN") 
let route = YelpRoute.restaurant(id: "abc123") 
let restaurant: YelpRestaurant = try await client.fetchItem(at: route, in: environment)

For more information, please see the getting started guide.


The online documentation has more information, articles, code examples, etc.

Demo Application

The demo app lets you explore the library on iOS and macOS. To try it out, just open and run the Demo project.

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.

Your support makes it possible for me to put more work into these projects and make them the best they can be.


Feel free to reach out if you have questions or want to contribute in any way:


ApiKit is available under the MIT license. See the LICENSE file for more info.


  • Swift Tools 5.9.0
View More Packages from this Author


  • None
Last updated: Sat May 18 2024 10:07:59 GMT-0900 (Hawaii-Aleutian Daylight Time)