Important
This script was built for educational purposes. Due to how FAB APIs are built to handle search pagination, all assets might not be claimable through this script. With the last script update, a total of ~600 scanned pages, with ~14k assets. Please note that, by clicking on the "Claim All" quixel button, you'll already have claimed all assets for future free usage, beyond 2024 (official response). This script simply makes sure that assets are added to a library.
As quixel megascan items will stop being free after 2024. So, this script will go through all Quixel MegaScan items and add them to your account. Quixel would be working on a tool to automatically add all resources to your FAB account, but I couldn't help myself and I wrote a script to do it.
- Copy the contents of the script below (
claim.js
) - Log in into your fab dashboard
- Make sure you have accepted the terms and conditions (e.g. try claiming any free asset)
- Go to the Quixel seller list at https://www.fab.com/sellers/Quixel
- Open devtools (F12) -> Go to "Console" tab
- Paste the script and press enter
Feel free to tweak the constants at the very top of the script to reduce wait times, or to prevent tiemouts or throttlings.
The script stopped working after X claims
Try running the script again. Before doing so, take note on the cursor and filter index values, and update the script with those, so you can resume the process at the same point where the script stopped executing. For example, if the script printed this message before stopping execution:
Getting content from page cursor bz0yMDQw, with filter index 1...
Update the top variables to match those values:
async function claimQuixelAssets() {
// Configurable constants to resume
const INITIAL_PAGE_CURSOR = "bz0yMDQw";
const INITIAL_FILTER_INDEX = 1;
// ...
Some claims constantly fail with a 500 error
For some reason, some assets cannot be claimed, not even through the web UI. Add the item IDs to the SKIP_ITEM_IDS
constant at the top of the script. The following items were throwing errors when running the script:
3e441085-0d1d-4476-93bc-e68d184026f2
f74671f7-d8a5-42e7-9dd4-e76639ca0ef0
So, I would update the SKIP_ITEM_IDS
to be:
const SKIP_ITEM_IDS = [
'3e441085-0d1d-4476-93bc-e68d184026f2',
'f74671f7-d8a5-42e7-9dd4-e76639ca0ef0',
];
Script is a bit slow between pages
The script sleeps by default for 5 seconds to prevent request throttling (not sure if there is any to be honest). If you don't want to wait that much, set the value of WAIT_TIME_BETWEEN_PAGES
to 0
.
Script stops after X pages
For some reason, the search query might stop depending on the sorting key that's used. Or, in some cases, repeat the same page over and over again. I'm currently trying to find a solution to this, but it totally depends on how the server responds to the search queries made by this script.
I'm getting HTTP 401 errors on all claim requests, even if I add them to
SKIP_ITEMS_ID
You must accept the terms and conditions first from FAB. For example, try manually adding through the web interface one free item to your library. Then, try running the script.
- [V1 23/10/24] Initial version
- [V2 24/10/24] Changed query parameters for retrieving item list
- [V3 25/10/24] Add error detection for cursor loops (around ~210 pages)
- [V4 25/10/24] Add multiple search filters for covering as many assets as possible
- [V5 26/10/24] Corrected an issue where the last filter (3d models) was not executed
- [V6 26/10/24] Add Set check for claimable assets, so they are claimed once, in case filters are repeated
- [V7 16/11/24] Rename CSRF cookie to
fab_csrftoken
I wrote the script by myself, but it was heavily inspired by this script, coded by jamiephan. Thanks to all the folks in the comment section who pointed out bugs, and suggested minor improvements!
Great work! thanks a lot.