# Google Fonts Library Metadata Extractor (`nimbryxo-studio/google-fonts-library-metadata-extractor`) Actor

Look up Google Fonts families by name, browse a category, or export the full library with weights, variable-font axes, language subsets, designers, popularity, and ready-to-use CSS embed URLs.

- **URL**: https://apify.com/nimbryxo-studio/google-fonts-library-metadata-extractor.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Developer tools, Automation, Other
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Fonts Library Metadata Extractor

Get structured metadata for Google's free, open-source font library instead of reading it off the fonts.google.com catalog by hand. Look a family up by name, pull every family in one of the five categories, or export the whole library at once, with weights, variable-font axes, language subsets, designer credits, and ready-to-paste specimen and CSS embed URLs.

### What this actor does

- **Three modes:** `byFamily`, `byCategory`, `listAll`
- **Every family:** weights, style variants, variable-font axes, language subsets, designers
- **Ranking signals:** popularity and trending positions across the whole library
- **Ready-to-use URLs:** a specimen page URL and a `css2` embed URL for each family
- **Empty fields are always omitted** — records only contain data that actually exists

### Output per font family

| Field | Description |
|---|---|
| `family` | Font family name (e.g. `Roboto`, `Open Sans`) |
| `displayName` | A display-friendly variant of the family name, when Google Fonts publishes one separate from `family` |
| `category` | `Sans Serif` / `Serif` / `Display` / `Handwriting` / `Monospace` |
| `stroke` | Stroke classification when present (e.g. `Sans Serif`, `Slab Serif`) |
| `classifications` | Secondary tags (e.g. `Display`, `Monospace`, `Symbols`) |
| `subsets` | Language / script subsets (e.g. `latin`, `cyrillic`, `greek`, `vietnamese`) |
| `weights` | Distinct numeric weights (e.g. `["100","400","700","900"]`) |
| `variants` | All style variants incl. italics (e.g. `["400","400i","700"]`) |
| `axes` | Variable-font axes: `[{tag, min, max, defaultValue}]` |
| `isVariable` | `true` when the family ships a variable font |
| `designers` | List of designer / foundry names |
| `popularity` | Popularity rank across the library (lower = more popular) |
| `trending` | Trending rank across the library |
| `dateAdded` | Date the family was first added to Google Fonts |
| `lastModified` | Date the family was last updated |
| `primaryScript` / `primaryLanguage` | Primary script / language when set |
| `colorCapabilities` | Color-font tech when present (e.g. `COLRV1`, `OTSVG`) |
| `isOpenSource` | `true` when Google Fonts marks the family open source in its metadata (true on virtually every family, since the whole library is open source) |
| `isBrandFont` | `true` when Google Fonts flags this family as a brand font |
| `isNoto` | `true` when the family is part of the Noto font collection |
| `googleFontsUrl` | Specimen page, e.g. `https://fonts.google.com/specimen/Open+Sans` |
| `cssUrl` | Embed stylesheet, e.g. `https://fonts.googleapis.com/css2?family=Open+Sans` |
| `recordType` | `font` |
| `scrapedAt` | ISO-8601 timestamp of the scrape |

### Output per failed lookup (recordType = `error`)

When a requested family name in `families` doesn't match any family in the library (mode=`byFamily`), the actor emits a typed error record instead of silently skipping it:

| Field | Description |
|---|---|
| `error` | Short error type, e.g. `not_found` |
| `message` | Human-readable explanation |
| `input` | The family name that didn't match |
| `sourceUrl` | The Google Fonts metadata endpoint queried |
| `scrapedAt` | ISO-8601 timestamp |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `byFamily` | `byFamily` / `byCategory` / `listAll` |
| `families` | array | `["Roboto"]` | Exact family names (mode=byFamily), case-insensitive |
| `category` | string | `Sans Serif` | One category (mode=byCategory) |
| `maxItems` | integer | `50` | Hard cap on emitted records (1–2000) |

#### Example: look up specific families

```json
{
  "mode": "byFamily",
  "families": ["Roboto", "Open Sans", "Playfair Display", "JetBrains Mono"]
}
```

#### Example: browse every monospace font

```json
{
  "mode": "byCategory",
  "category": "Monospace",
  "maxItems": 100
}
```

#### Example: export the whole library

```json
{
  "mode": "listAll",
  "maxItems": 2000
}
```

### Use cases

- **Design systems** — build a searchable, filterable font picker from live Google Fonts data
- **Web performance** — pull the exact `css2` URLs and weights you need before self-hosting
- **Typography research** — analyse the library by category, popularity, or variable-font support
- **App onboarding** — offer users a curated font list without hand-maintaining metadata
- **SEO / content tooling** — enrich articles and galleries with accurate font specifications
- **Localization** — filter families by language subset (Cyrillic, Greek, Vietnamese, and more)

### FAQ

**Where does the data come from?**  The official public Google Fonts metadata catalog that powers [fonts.google.com](https://fonts.google.com). No login or API key is required.

**How many fonts are covered?**  The entire library — over 1,900 families and growing. `listAll` returns all of them (up to `maxItems`).

**What are the categories?**  `Sans Serif`, `Serif`, `Display`, `Handwriting`, and `Monospace`.

**What's the difference between `weights` and `variants`?**  `weights` lists the distinct numeric weights (e.g. `400`, `700`). `variants` lists every shipped style, including italics (e.g. `400`, `400i`, `700`, `700i`).

**What are `axes`?**  For variable fonts, the adjustable axes — such as `wght` (weight), `wdth` (width), `slnt` (slant), or `opsz` (optical size) — each with its `min`, `max`, and `defaultValue`.

**How do I embed a font?**  Use the `cssUrl` in a `<link>` tag, then reference the `family` in your CSS `font-family`. You can add `:wght@...` to the URL to request specific weights.

**Are these fonts free to use?**  Yes. Every Google Font is open source (licensed under the SIL Open Font License or Apache License 2.0) and free for commercial and personal use.

**How fresh is the data?**  Live — the actor fetches the current metadata document on every run, so new families and updates appear as soon as Google publishes them.

**Is this affiliated with Google?**  No. This is an independent, third-party actor that reads Google Fonts' publicly available library metadata and is not affiliated with or endorsed by Google.

# Actor input Schema

## `mode` (type: `string`):

What to fetch from the Google Fonts library.

## `families` (type: `array`):

Exact font family names, e.g. `Roboto`, `Open Sans`, `Lora`, `Playfair Display`. Case-insensitive.

## `category` (type: `string`):

Filter the library to a single font category.

## `maxItems` (type: `integer`):

Hard cap on the number of font records emitted.

## Actor input object example

```json
{
  "mode": "byFamily",
  "families": [
    "Roboto"
  ],
  "category": "Sans Serif",
  "maxItems": 50
}
```

# Actor output Schema

## `fonts` (type: `string`):

Dataset containing all scraped Google Fonts families.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "byFamily",
    "families": [
        "Roboto"
    ],
    "category": "Sans Serif",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/google-fonts-library-metadata-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "byFamily",
    "families": ["Roboto"],
    "category": "Sans Serif",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/google-fonts-library-metadata-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "byFamily",
  "families": [
    "Roboto"
  ],
  "category": "Sans Serif",
  "maxItems": 50
}' |
apify call nimbryxo-studio/google-fonts-library-metadata-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/google-fonts-library-metadata-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/A4QB3ojaS4j3hOMXS/builds/ki7Rr9Ay6NYX8F1iZ/openapi.json
