Skip to content

Get a pixiv token ​

PixivFE talks to pixiv as a logged-in user. Your "token" is the PHPSESSID cookie pixiv sets when you log in.

WARNING

For a public instance, use a spare account. The Discovery page shows content based on the account's preferences, and pixiv may suspend accounts that send many requests.

1. Log in ​

Log in to pixiv, or open https://www.pixiv.net/ if you already are.

pixiv landing page URL

Press F12 to open developer tools.

FirefoxChrome
TabStorageApplication
SidebarCookies → www.pixiv.netStorage → Cookies → www.pixiv.net

Copy the value next to PHPSESSID. It looks like 123456_AaBbccDDeeFFggHHIiJjkkllmMnnooPP: your member ID, an underscore, then random characters.

Screenshots

Firefox:

Storage tab in FirefoxPHPSESSID in Firefox

Chrome:

Application tab in ChromePHPSESSID in Chrome

3. Give it to PixivFE ​

Set PIXIVFE_TOKEN to the value. For several accounts, separate tokens with commas:

sh
PIXIVFE_TOKEN=token1,token2,token3

Logging out of pixiv ends the token. Get a new one if PixivFE stops working after you log out.

4. Adjust account settings (optional) ​

PixivFE works best when the account has:

  • Japan as its region
  • R-18G content shown
  • AI-generated works shown

deploy/prepare-account.sh sets these for you:

sh
./deploy/prepare-account.sh YOUR_TOKEN

Or set them by hand in pixiv's display settings. To check that R-18G works, open the gore search endpoint and look for R-18G tags in the results.


Chrome steps adapted from Nandaka's PixivUtil2 guide.