The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more⁠(opens in a new tab or window).
Canva Developers SDK
The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more⁠(opens in a new tab or window).
API reference
Intents
Intents: Asset
Intents: Content
Intents: Design
Intents: Test
Platform: Test

searchFonts

API reference for the searchFonts method.

This API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.

Returns a list of fonts that match the given search query.

This returns fonts from the Canva library that matches the search query. It does not return custom or brand fonts.

Usage: Performing a font search for "serif"

import { searchFonts } from "@canva/asset";
const results = await searchFonts({
query: "serif"
});
const foundFonts = [];
for await (const fonts of results.pages) {
foundFonts.push(...fonts);
}
TYPESCRIPT

Parameters

requestSearchFontsRequest
Required

Options for searching for fonts.

querystring
Required

The query provided for a font search request.

Returns

The result of searching for fonts. This is a Promise that resolves with the following object:

pagesAsyncIterable<Font[]>

Each page is an array of Font matching the search query.

Iterate over pages with for await to retrieve fonts from the search request, one page at a time.

refFontRef

A unique identifier that points to a font asset in Canva's backend.

namestring

The name of the font.

weightsFontWeight[]

The available font weights for the font.

weightFontWeightName

The name of the font weight.

Available values:

  • "normal"
  • "thin"
  • "extralight"
  • "light"
  • "medium"
  • "semibold"
  • "bold"
  • "ultrabold"
  • "heavy"
stylesFontStyle[]

The font styles available for this specific font weight.

Available values:

  • "normal"
  • "italic"
previewUrlstring
Optional

The URL of an image that renders a preview of the font.