Explore, filter, and download artworks from your pixiv bookmarks.
- Sync with your pixiv bookmarks incrementally
- Find or exclude bookmarked artworks by tags, title, or author
- Parallel and reliable download of bookmarked artworks
- Local and remote access via a responsive Web UI
- Cross-platform (Windows, Linux, and Android via Termux are tested)
- Custom FTS engine with FM-Index and incremental LSM for instant multi-keyword querying
- Suffix-based indexing for accurate substring search in CJK titles and tags
- Optimized with square-root decomposed bitmaps and query planner to achieve <1ms latency on 100K+ collections
- Robust and efficient download manager with asynchronous I/O and file transactions for data integrity
- Minimal resource usage for local-first experience on resource-constrained devices
- Download and extract the latest Release for your platform
- Retrieve your pixiv
refresh_token- See Retrieving Auth Token or use get-pixivpy-token
- Create a
config.jsonfile in the extracted directory- A minimal example:
{ "username": "<your pixiv username>", "refresh_token": "<your refresh token>" }
- A minimal example:
- Run
pvgorpvg.exeto start the server - Open the URL shown in the terminal (Ctrl-click) in your browser
- Typically http://127.0.0.1:5678
The following options can be specified in config.json:
username: Your pixiv username (required)refresh_token: Your pixiv refresh tokenPIXIV_REFRESH_TOKENenvironment variable takes precedence. Either must present.
port: Port to listen on (default:5678)host: Interface to listen on (default:"127.0.0.1")- Specify a LAN address or
"0.0.0.0"to allow access from network
- Specify a LAN address or
proxy: Proxy to use for network requests- Example:
"http://127.0.0.1:8080"
- Example:
safe_mode: Turn on to show only illustions with a safe sanity_level (default:false)bookmark: Turn on to servePOST /bookmark(default:false)home: Path to the directory to store data and index (default:.)- Downloaded artworks are saved in
<home>/pix
- Downloaded artworks are saved in
With bookmark on, POST /bookmark takes {"id": <illust id>} and bookmarks
that illust on pixiv under the configured account, public restrict, whether or
not the archive knows it. The archive picks it up on the next incremental
update. An illust already in the index is one pixiv already has bookmarked, so
it answers from the index and calls no API. A pixiv rejection (a rate limit, an
expired token, an unknown id) comes back as a 500 whose body names pixiv's
status and its message, read out of the JSON envelope pixiv wraps it in, for the
client to show as text.
This is the only route that writes to the pixiv account, so a server reachable
beyond 127.0.0.1 offers that write to everyone who can reach it. Turn it on
only where that is intended; with it off the route does not exist.
$ cargo build --releaseThe usage of pixiv AAPI refers to the following projects: