Back to Typesense

API Clients

docs-site/content/0.22.1/api/api-clients.md

latest4.0 KB
Original Source

API Clients

Libraries

The following client libraries are thin wrappers around Typesense's RESTful APIs and provide an idiomatic way to make Typesense API calls from your preferred language.

:::tip Typesense has a RESTful API so it can be used with any HTTP library in any programming language, even the ones not listed below. The client libraries are just thin wrappers around Typesense's HTTP API. :::

We have client libraries for:

We also have the following community-maintained client libraries:

<Tabs :tabs="['JavaScript','PHP','Python','Ruby','Dart', 'Java', 'Swift']"> <template v-slot:JavaScript>
js
// npm install typesense @babel/runtime

// Browser
<script src="dist/typesense.min.js"></script>
</template> <template v-slot:PHP>
shell
composer require php-http/curl-client typesense/typesense-php
</template> <template v-slot:Python>
shell
pip install typesense
</template> <template v-slot:Ruby>
shell
gem install typesense
</template> <template v-slot:Dart>
dart
// With Dart:
//  $ dart pub add typesense

// With Flutter:
//  $ flutter pub add typesense

// This will add a line like this to your package's pubspec.yaml:
// dependencies:
//   typesense: ^0.1.1

// Now in your Dart code, you can use:

import 'package:typesense/typesense.dart';
</template> <template v-slot:Java>
java
// Download the JAR file from the releases section in the typesense-java repository. 
// (https://github.com/typesense/typesense-java/releases)
// And the import it them to your project

import org.typesense.api.*;
import org.typesense.models.*;
import org.typesense.resources.*;
</template> <template v-slot:Swift>
swift
// For an iOS app, add typesense-swift as a framework dependency:
// Target -> General -> Frameworks, Libraries, and Embedded Content -> "+" -> Add Package Dependency -> typesense-swift

//For swift packages, add typesense-swift to the dependencies array in Package.swift:
...
dependencies: [
           .package(url: "https://github.com/typesense/typesense-swift", .upToNextMajor(from: "0.1.0"),
],
...
</template> </Tabs>

Postman Collection

We have a community-maintained Postman Collection here: https://github.com/typesense/postman.

Postman is an app that let's you perform HTTP requests by pointing and clicking, instead of having to type them out in the terminal. The Postman Collection above gives you template requests that you can import into Postman, to quickly make API calls to Typesense.

Framework Integrations

We also have the following framework integrations:

Utilities

We also have the following utilities: