Here are the objects our GraphQL API supports.

Advertisement

Account

A Font Awesome account.

Field{.width-30} Description Auth
id (Integer) The account id. profile_read
email (String) The account email address. profile_read
proCdnReferrers (ProCdnReferrers) Collection of domains that have been whitelisted for Pro CDN usage associated with this account. domains_read
kits (Kits) All kits on this account. kits_read
kit (Kit) The kit on this account, specified by token. kits_read

For the kit field:

Argument{.width-30} Type Description
token String! required. A kit token, like "47997b2a2a"

Download

Information about the the download assets for a release.

Field{.width-30} Description
separatesWebDesktop (Boolean) Whether this release has separate download assets for Web and Desktop use cases.
Advertisement

IconCount

Field{.width-30} Description
free (Integer!) Count of Free icons in this release.
pro (Integer!) Count of Pro icons in this release.

IconUpload

A icon that has been uploaded to a kit.

The available fields provide all of the information needed to build and render a Font Awesome icon in any of several ways.

(In the following examples, ${width} is pseudo-code that means to use the value of width as returned by this API.)

IconDefinition object

An iconDefinition could be constructed for use in the JavaScript API or when using the React component.

const someIconDefinition = {
  "prefix": "fak",
  "iconName": `${name}`,
  "icon": [
    parseInt(`${width}`),
    parseInt(`${height}`),
    [], // no ligatures
    unicode.toString(16),
    `${path}`
  ]
}

// React component
<FontAwesomeIcon icon={ someIconDefinition }/>

Or an abstract:

import { icon } from '@fortawesome/fontawesome-svg-core'

icon(someIconDefinition).abstract

SVG element

A valid Font Awesome inline SVG can be built from the data in this object, for example:

<svg class="svg-inline--fa" viewBox="0 0 ${width} ${height}">
  <path d="${path}" />
</svg>

An <i> Element

The name can suffice for building an <i> using Font Awesome CSS class names:

<i class="fak fa-${name}"></i>

This could be added to a DOM that has either the JavaScript framework loaded with autoReplaceSvg enabled (in which case it will be automatically transformed into an <svg>), or the Webfont with CSS technology loaded (in which case, it will be rendered from the loaded webfont).

Note that fak is always used as the style prefix for Kit Icon Uploads.

Advertisement

CSS pseudo-element

Using the unicode, an icon could be referenced using a CSS pseudo-element

HTML:

<ul class="fancy-list">
  <li>Alpha</li>
  <li>Beta</li>
</ul>

CSS:

.fancy-list {
  list-style-type: none;
  margin-left: 2.5em;
  padding-left: 0;
}
.fancy-list li:before {
  content: '\e001';
  font-family: 'Font Awesome Kit';
  margin-right: 0.25em;
}

(Replace e001 with the unicode value as hex string: e.g. unicode.toString(16).)

Note that the font-family for an icon upload is always "Font Awesome Kit".

Field{.width-30} Description
name (String) Name of the icon, as specified by the customer who owns this kit.
unicode (Integer) Value of the unicode, as an integer. This is generated by the system when the customer creates the icon upload. It is unique within a given kit, but two different kits may use the same unicode for different icons.
version (Integer) Serial version number for this icon upload. If the customer changes the icon's, path data, for example, the version number would change.Only the latest version is available via this API.
width (String) The width as would be used in the third parameter of the viewBox attribute of an <svg> element. (Example above)
height (String) The height as would be used in the third parameter of the viewBox attribute of an <svg> element. (Example above)
path (String) SVG path data as would be used in the d attribute of an SVG <path> element. (Example above)

Icon

A specific Font Awesome icon.

Field{.width-30} Description
id (String!) The identifying name of an icon, like pizza-slice or bicycle.
changes ([String!]!) List of Font Awesome versions in which this icon was changed.
label (String!) Usually, a more human readable representation of this icon. For example, the icon with id "coffee-pot" has a label of "Coffee Pot".
styles ([String!]!) List of Font Awesome styles in which this icon appears, such as: "solid", "regular", "light", "duotone".
unicode (String!) Unicode by which this icon can be identified--just the hex digits as a string. For example, the value of this field for the coffee icon is "f0f4".
membership (Membership!) An object representing each license type--free and pro--in which styles this icon appears.
shim (Shim) A renaming or change in style for this icon between Font Awesome 4 and Font Awesome 5.
Advertisement

Kit

Metadata about a Font Awesome Kit.

Field{.width-30} Description Auth
name (String!) User-assignable name for the kit, like a nickname. When a kit is created, its
initial name is just the token.
token (ID!) The token identifies this kit and is used in the URL for the kit's embed code.
status (String!) A value of "published" indicates that the kit is live and usable.
licenseSelected (String!) Either "free" or "pro", indicating whether this kit will be able to load Pro icons, or only Free icons, and how they'll be loaded, since Pro kits use some additional loading optimizations.
technologySelected (String!) Either "webfonts" or "svg".
version (String!) The Font Awesome version that this kit loads.
minified (Boolean!) Whether this kit loads minified assets.
domains ([String!]!) List of domains, possibly involving wildcards, which are valid Origin domains for which to load this kit. domains_read
autoAccessibilityEnabled (Boolean!) Whether the auto accessibility features are enabled for this kit.
shimEnabled (Boolean!) Whether Font Awesome 4 compatibility is enabled for this kit.
iconUploads (IconUpload) List of IconUpload on this kit.

Membership

Indicates for each license type, in which styles this icon appears.

Field{.width-30} Description
free ([String!]!) A list of styles in which this icon appears in Font Awesome Free. Free icons normally only appear in the "solid" style. Some also appear in the "regular" style for closer visual equivalence with Font Awesome 4. For icons that do not appear in Font Awesome Free at all, like alicorn, this will be an empty list.
pro ([String!]!) A list of styles in which this icon appears in Font Awesome Pro. Pro icons normally appear in all available styles.

ProCdnReferrers

Collection of domains that have been whitelisted for Pro CDN usage associated with the authenticated account.

Field{.width-30} Description Auth
hostnames ([String]) List of domain names. domains_read required
limit (Integer) Limit of the number of domains allowed to be whitelisted for this account. domains_read required
active (Boolean) Whether this domain whitelist is active. domains_read required
Advertisement

Release

Metadata about a given release of Font Awesome, identified by version.

Field{.width-30} Description
date (String!) The date of the release, in iso8601 format (YYYY-MM-DD), like this: 2020-03-23
isLatest (Boolean!) Whether this release, at the time of this query's execution, is the latest available Font Awesome release.
download (Download) Metadata about the download formats available for this release.
iconCount (iconCount) Metadata about icon counts in Free vs. Pro in this release.
srisByLicense (SrisByLicense!) For each license type--free and pro--provides Subresource Integrity hashes for each CDN resource available in this release.
version (String!) The major.minor.patch version number that identifies this release. Example: 5.13.0
icons (Icon!) All icons in this release.

For the icons field:

Argument Type Description
license String may be "free" or "pro". "free" includes icons available in Font Awesome Free. "pro" includes icons available only in Pro, such as alicorn. Omit this argument to return all icons.

Shim

A shim to support Version 4 syntax.

A shim helps to achieve compatibility with Font Awesome 4 icon references on a Font Awesome 5 installation. Ideally, users will upgrade all icon references to use Font Awesome 5 syntax. But Font Awesome 4 is still commonly in use, and is sometimes difficult to upgrade. Shims can ease the upgrade path.

Learn more about version 4 compatibility.

What shims can do

  1. Some icons that appear in both Font Awesome 4 and Font Awesome 5 have been renamed. A shim can map the version 4 icon name to the version 5 icon name automatically.

  2. For some icons, their appearance in the Regular style of Font Awesome 5 is more visually equivalent to their appearance in the single style of Font Awesome 4, than is their appearance in the default Solid style. A shim can map the style of such an icon so that the version 5 style used to render the icon, when version 4 compatibility is enabled, will be that non-default style.

  3. Font Awesome 5 puts all brand-related icons into a separate Brands style; Font Awesome 4 did not. A shim can map version 4 brand icons into the Font Awesome 5 Brand style.

Examples

Icons with no shims

Examples of icons with no shims include intersection and coffee. The intersection icon first appeared in Font Awesome 5, and therefore has no shim.

The coffee icon appeared prior to Font Awesome 5, yet because its equivalent form in Font Awesome 5 is in the Solid (fas) style, and because that is the default style in Font Awesome 5, no shim is required.

Icons with shims

Examples of icons with shims include bluetooth, bath, and address-book.

The bluetooth icon's name is the same in Font Awesome 4 and 5, but because it is a brand icon, and all brand icons appear in the Font Awesome 5 Brand (fab) style, the shim exists to map it into that style.

The bath icon in Font Awesome 5 is equivalent to the icon that was called "bathtub" in Font Awesome 4. The shim maps from the old name to the new name.

The address-book icon is equivalent to what was called address-book-o in Font Awesome 4. Its name change in Font Awesome 5 indicates a naming convention change. Instead of the "-o" in the icon name, indicating an "outline" style for some icons in Font Awesome 4, Font Awesome 5 has a Regular (far) style and all icons have Regular style variants.

Since the Regular (far) style is a non-default style in Font Awesome 5, the shim must not only map the icon's name from address-book-o, but also its style into the Font Awesome 5 Regular (far) style.

Field{.width-30} Description
id (String!) The version 4 name of the icon. Example: the shim for the Font Awesome 5 "bath" icon has an id of "bathtub", because this icon was called "bathtub" in Font Awesome 4.
name (String) The version 5 name of the icon. If this field is null, it means the version 4 and version 5 icon names are the same. In that case, the shim's prefix must hold the significant difference.
prefix (String) The style prefix of this icon in Font Awesome 5. For example, on the address-book icon, this will be "far". If null, it means that the version 5 equivalent for this icon is in the default Solid style, whose prefix is "fas".
Advertisement

Sri

A Subresource Integrity (opens new window) hash value for a CDN resource at a relative path.

Field{.width-30} Description
path (String!) Relative path to a resource on a Font Awesome CDN. Example: css/all.css is a relative path to the stylesheet that loads all icons using the Webfonts with CSS technology.
value (String!) The hash value of the contents of the resource indicated by path.

For example, the value of the contents of css/all.css in Font Awesome 5.13.0 is:

sha384-Bfad6CLCknfcloXFOyFnlgtENryhrpZCe29RTifKEixXQZ38WheV+i/6YWSzkz3V

SrisByLicense

An Sri collection for a Font Awesome release, organized by license: free or pro.

The relative path css/all.css is valid on both the Free and Pro CDNs, but refers to two different resources with different contents, and therefore different hashes.

Field{.width-30} Description
free ([Sri!]!) The set of Sri objects for all resources on the Free CDN for this release.
pro ([Sri!]!) The set of Sri objects for all resources on the Pro CDN for this release.

You're viewing the Version 6 Beta

It's all the awesome of 5, but now more six-y! Version 6 brings over 13,000 icons across 5 styles – including the new Thin style! – and includes more and faster services.

Get the Deets on Version 6

Head Back to Our Current Version 5 Release

Need a Hand?

If you’re stuck or have a question, check our Troubleshooting docs, all of the Font Awesome threads on Stack Overflow, or contact our community on GitHub.

Or get Real Human Support™ with a Pro Subscription!