Skip to content

Instantly share code, notes, and snippets.

@azarus
Last active November 11, 2024 16:15
Show Gist options
  • Save azarus/8daada7b1e69e16f40d378e05681b4b4 to your computer and use it in GitHub Desktop.
Save azarus/8daada7b1e69e16f40d378e05681b4b4 to your computer and use it in GitHub Desktop.

Unofficial Fab.com API Documentation

Base URL

All API endpoints are accessed via:

https://www.fab.com/i/

Cursor-Based Pagination

  • Description: The API uses cursors for paginating data responses.
  • Format:
    • Cursors are encoded in Base64.
    • Decoded values often contain parameters like offsets or timestamps for data navigation.
    • Examples:
      • bz0zNjQ4 → Decodes to o=3648 (indicating a data retrieval offset).
      • cD0yMDI0LTEwLTI3VDEzJTNBMTMlM0ExMC44MzM2NDBa → Decodes to p=2024-10-27T13:13:10.833640Z (a timestamp).
    • Common Cursor Parameters:
      • o (offset): Specifies a numeric index for data retrieval.
      • p (pointer/position): Represents a specific point in time or position.
      • r (record/reference): Indicates versions, states, or data references.

/listings/search

  • Description: Retrieves listings based on provided criteria.
  • Method: GET
  • Query Parameters:
    • currency (string) - Currency code (e.g., "USD").
    • categories (string, optional) - Comma-separated list of category filters.
    • channels (string, optional) - Comma-separated list of channels.
    • listing_types (string, optional) - Comma-separated list of listing types.
    • sort_by (string, optional) - Sorting field, prefixed with + or - to indicate ascending or descending order.
    • cursor (string, optional) - Pagination cursor.
    • tags (string, optional) - Comma-separated tags.
    • seller (string, optional) - Encoded seller name.
    • published_since (string, optional) - Date in YYYY-MM-DD format.
    • Additional parameters like licenses, is_ai_generated, is_ai_forbidden, max_avg_rating, min_avg_rating, is_free, min_price, max_price, min_file_size, max_file_size, is_discounted.

Notes:

  • productId values are universally unique identifiers (UUIDs).
  • All identifiers are UUIDs, except for asset-format types, which are string codes.

/listings/{productId}

  • Description: Retrieves details of a specific listing.
  • Method: GET
  • Path Parameters:
    • productId (UUID) - Unique identifier for the listing.

/listings/{productId}/asset-formats/{assetFormatType}

  • Description: Retrieves asset formats for a specific listing.
  • Method: GET
  • Path Parameters:
    • productId (UUID) - Unique identifier for the listing.
    • assetFormatType (string) - Type of asset format (e.g., "image", "converted-files", "additional-files"). Note that some custom formats are not returned by the API.

/taxonomy/licenses

  • Description: Fetches available licenses.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/csrf

  • Description: Retrieves a CSRF token.
  • Method: GET

/price-tiers

  • Description: Fetches price tier details.
  • Method: GET
  • Notes:
    • Example price tier IDs:
      • 45da1a2f292a46c78dab0c98c5181e9a_USD_0_1701881379100
      • 45da1a2f292a46c78dab0c98c5181e9a_USD_129999_1701881676040
    • These identifiers consist of a unique segment, currency, and numeric values, but their exact interpretation remains unclear.

/{engine}/versions

  • Description: Retrieves version information for a specified engine.
  • Method: GET
  • Path Parameters:
    • engine (string) - Engine type (e.g., "unity", "unreal-engine", "uefn").

/channels

  • Description: Retrieves a list of available channels.
  • Method: GET

/channels/{engine}

  • Description: Retrieves channel details for a specific engine.
  • Method: GET
  • Path Parameters:
    • engine (string) - Engine type.

/layouts/{engine}

  • Description: Retrieves layouts and content for specified channels or engines.
  • Method: GET
  • Path Parameters:
    • engine (string) - Engine type.

/target-platforms

  • Description: Fetches available target platforms.
  • Method: GET

/sellers/{sellerName}

  • Description: Retrieves information about a seller.
  • Method: GET
  • Path Parameters:
    • sellerName (string) - Seller's name.

/sellers/{sellerName}/profile

  • Description: Retrieves the profile information of a seller.
  • Method: GET
  • Path Parameters:
    • sellerName (string) - Seller's name.

/taxonomy/listing-types

  • Description: Fetches available listing types.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/taxonomy/asset-format-groups

  • Description: Fetches groups of asset formats.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/taxonomy/asset-format-types

  • Description: Retrieves available asset format types.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/taxonomy/categories

  • Description: Retrieves available categories.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/taxonomy/categories/tree

  • Description: Retrieves the category tree structure.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/tags

  • Description: Fetches available tags.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

/taxonomy/listing-types/asset-format-types

  • Description: Retrieves asset formats associated with listing types.
  • Method: GET

/reviews

  • Description: Retrieves reviews.
  • Method: GET
  • Query Parameters:
    • cursor (string, optional) - Pagination cursor.

Additional Notes on listing_types

  • Each listing type includes metadata such as:
    • code
    • createdAt
    • deletedAt
    • updatedAt
    • version
    • name
    • icon
    • description
  • Example listing types:
    • "2d-asset": Assets for building 2D games.
    • "3d-model": Characters, props, and more for 3D modeling.
    • "audio": Sounds and music.
    • "ui": User interface elements for games.

/exchange-rates/{currencyCode}

Endpoint:
GET /i/exchange-rates/{currencyCode}

Path Parameters:

  • currencyCode (string): The three-letter ISO 4217 currency code representing the desired currency exchange rate (e.g., "EUR" for Euro).

Response: The endpoint returns a JSON object containing the exchange rate information for converting between the base currency (typically "USD") and the requested currency.

Example Response:

{
  "fromCurrencyCode": "USD",
  "toCurrencyCode": "EUR",
  "value": 0.9333711469,
  "inverseValue": 1.071385164756050
}

Response Fields:

  • fromCurrencyCode (string): The source currency code (e.g., "USD").
  • toCurrencyCode (string): The target currency code (e.g., "EUR").
  • value (number): The exchange rate from the fromCurrencyCode to the toCurrencyCode.
  • inverseValue (number): The inverse of the exchange rate, representing the rate from the toCurrencyCode to the fromCurrencyCode.

Usage Example: To fetch the exchange rate for Euro (EUR) against USD:

GET https://www.fab.com/i/exchange-rates/EUR

AI generated, take it with a grain of salt, based on my findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment