Developer API

Google Fonts API with SVG Previews & Emoji Assets

API Overview

The fonts.grida.co API provides programmatic access to Google Fonts metadata, SVG previews, and Apple Color Emoji assets. All endpoints are CORS-enabled and optimized for performance with long-term caching.

Base URL

https://fonts.grida.co

API Endpoints

Fonts Metadata

GET
/webfonts.json

Standard Google Fonts metadata with all font families and variants

/webfonts-vf.json

Variable fonts metadata with axis information

SVG Font Previews

GET
/svg/[fontname].svg

SVG preview of any Google Font. Font names are lowercase with spaces replaced by hyphens.

Apple Color Emoji

GET
/apple/emoji/160/[unicode].png

High-quality PNG emoji images for Linux compatibility. Unicode should be lowercase hex.

Code Examples

JavaScript/TypeScript

Fetch Font Metadata

const response = await fetch('https://fonts.grida.co/webfonts.json');
const fonts = await response.json();
console.log(fonts.items[0]); // First font family

Get SVG Preview

const svgUrl = 'https://fonts.grida.co/svg/roboto.svg';
const img = document.createElement('img');
img.src = svgUrl;
document.body.appendChild(img);

cURL

Get Font Metadata

curl -H "Accept: application/json" \
  https://fonts.grida.co/webfonts.json

Download SVG

curl -o roboto.svg \
  https://fonts.grida.co/svg/roboto.svg

SVG Font Previews

Live examples of SVG font previews available through our API:

Roboto

Roboto font preview
/svg/roboto.svg

Open Sans

Open Sans font preview
/svg/opensans.svg

Lato

Lato font preview
/svg/lato.svg

Poppins

Poppins font preview
/svg/poppins.svg

Inter

Inter font preview
/svg/inter.svg

Montserrat

Montserrat font preview
/svg/montserrat.svg

Apple Color Emoji PNG Files

We serve Apple Color Emoji PNG files for Linux compatibility. These are high-quality emoji images that can be used in applications requiring consistent emoji rendering across platforms.

Important Notice

We do not serve AppleColorEmoji.ttf font files as they are proprietary and protected by Apple's EULA. We respect Apple's intellectual property rights and only provide the open-source PNG implementation for Linux compatibility.

Access Pattern

Access emoji PNG files using the following URL pattern:

https://fonts.grida.co/apple/emoji/160/[unicode].png

Examples

Copyright Symbol

Copyright emoji
/apple/emoji/160/00a9.png

Heart Symbol

Heart emoji
/apple/emoji/160/2764.png

Smile Face

Smile emoji
/apple/emoji/160/1f642.png

Usage in CSS

You can use these emoji PNG files in your CSS for consistent emoji rendering:

.emoji-heart { background-image: url('https://fonts.grida.co/apple/emoji/160/2764.png'); }

Usage Policies

  • • No authentication required
  • • Commercial use allowed
  • • Attribution appreciated but not required
  • • Free to use for all applications

Technical Details

CORS Headers

All files are served with CORS headers enabled for cross-origin requests:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type

Caching

Files are cached for optimal performance:

Cache-Control: public, max-age=31536000, immutable
Content-Type: image/svg+xml; charset=utf-8
ETag: Strong validation