Search by Algolia
Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Algolia named a leader in IDC MarketScape
algolia

Algolia named a leader in IDC MarketScape

We are proud to announce that Algolia was named a leader in the IDC Marketscape in the Worldwide General-Purpose ...

John Stewart

VP Corporate Marketing

Mastering the channel shift: How leading distributors provide excellent online buying experiences
e-commerce

Mastering the channel shift: How leading distributors provide excellent online buying experiences

Twice a year, B2B Online brings together America’s leading manufacturers and distributors to uncover learnings and industry trends. This ...

Jack Moberger

Director, Sales Enablement & B2B Practice Leader

Large language models (LLMs) vs generative AI: what’s the difference?
ai

Large language models (LLMs) vs generative AI: what’s the difference?

Generative AI and large language models (LLMs). These two cutting-edge AI technologies sound like totally different, incomparable things. One ...

Catherine Dee

Search and Discovery writer

What is generative AI and how does it work?
ai

What is generative AI and how does it work?

ChatGPT, Bing, Bard, YouChat, DALL-E, Jasper…chances are good you’re leveraging some version of generative artificial intelligence on ...

Catherine Dee

Search and Discovery writer

Feature Spotlight: Query Suggestions
product

Feature Spotlight: Query Suggestions

Your users are spoiled. They’re used to Google’s refined and convenient search interface, so they have high expectations ...

Jaden Baptista

Technical Writer

What does it take to build and train a large language model? An introduction
ai

What does it take to build and train a large language model? An introduction

Imagine if, as your final exam for a computer science class, you had to create a real-world large language ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

The pros and cons of AI language models
ai

The pros and cons of AI language models

What do you think of the OpenAI ChatGPT app and AI language models? There’s lots going on: GPT-3 ...

Catherine Dee

Search and Discovery writer

How AI is transforming merchandising from reactive to proactive
e-commerce

How AI is transforming merchandising from reactive to proactive

In the fast-paced and dynamic realm of digital merchandising, being reactive to customer trends has been the norm. In ...

Lorna Rivera

Staff User Researcher

Top examples of some of the best large language models out there
ai

Top examples of some of the best large language models out there

You’re at a dinner party when the conversation takes a computer-science-y turn. Have you tried ChatGPT? What ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What are large language models?
ai

What are large language models?

It’s the era of Big Data, and super-sized language models are the latest stars. When it comes to ...

Catherine Dee

Search and Discovery writer

Mobile search done right: Common pitfalls and best practices
ux

Mobile search done right: Common pitfalls and best practices

Did you know that 86% of the global population uses a smartphone? The 7 billion devices connected to the Internet ...

Alexandre Collin

Staff SME Business & Optimization - UI/UX

Cloud Native meetup: Observability & Sustainability
engineering

Cloud Native meetup: Observability & Sustainability

The Cloud Native Foundation is known for being the organization behind Kubernetes and many other Cloud Native tools. To foster ...

Tim Carry

Algolia DocSearch is now free for all docs sites
product

Algolia DocSearch is now free for all docs sites

TL;DR Revamp your technical documentation search experience with DocSearch! Previously only available to open-source projects, we're excited ...

Shane Afsar

Senior Engineering Manager

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

Early February, we released the Algolia API Client JavaScript v4, our most powerful JavaScript client ever. It’s faster, smaller, and more flexible, and provides full support for our Common API Client specifications. Significantly, it includes previously unavailable methods like zero-downtime reindexing, cross-account operations, and many other complex operations.

The good news is that it involves only minimal changes to the API, so updating should take less than ten minutes: Upgrade Guide.

In this article, we’ll highlight some of the main advances in this brand new version.

Reduced file size

Our new client comes packed with new features; yet, despite these additions, it’s actually smaller compared to v3:

  • The lite version is 4.27 kb gzipped on v4, down from 13.21 kb on v3.
  • The default version is 7.44 kb gzipped on v4, down from 19.35 kb on v3.

That amounts to a combined 64% size decrease compared to the previous version. With this decrease, your page loads faster.

Zero dependencies

Also, we’ve reduced the number of dependencies from 15 to 0. Yes, that’s right – 0 dependencies. So we no longer take the risk of receiving third-party updates that might break the client.

Taking DX one step further

To provide the best developer experience, we’ve added a bunch of new helpers that aren’t just a simple mapping to API endpoints. Users are now able to `replaceAllObjects` with zero downtime, or `copyIndex` between apps, and many other such multi-task operations! Here are some examples:

State of the art JavaScript

For optimal developer experience and type safety, the new client is fully written in TypeScript. Thanks to this, the developer will be able to leverage optional static typing and type inference out of the box.

Redesigned architecture

Just like v3, we ship with two versions: lite and default – these are predefined versions that help developers get started quickly using the traditional: “algoliasearch(appId,apiKey)”.

Now, thanks to a brand new architecture, you can build your own version of the client, adapted to your needs. Here is an example:

With this approach, developers can inject their own requester and logger, as well as their own cache implementations. Good news is that, even if you inject your concrete implementations, everything still runs under our retry strategy.

We believe this modularity helps developers meet the demands of more advanced use cases.

And more!

The Algolia API Client JavaScript is 100% open source, so feel free to dig through the source code to see exactly how it works. Dig right in! Visit our documentation.

See something that needs to be improved? Just send us a pull request on GitHub.  Thanks! And we hope you enjoy this new release! 🎉

About the author
Nuno Maduro

Software engineer at Algolia

githubtwitter

Recommended Articles

Powered byAlgolia Algolia Recommend

How to build an API client for Javascript as a SaaS product
engineering

Peter Villani

Sr. Tech & Business Writer

Ruby Client v2 is out!
engineering

Chloé Liban

Software Egineer

Connectors, Docs & the Future — a Deeper Look into InstantSearch.js v2
product

Alexandre Stanislawski