The details of the pixiv ajax API are shown below.
This repository and documentation have been unmaintained and neglected for a long time. During the unmaintained period, the pixiv Ajax API has undergone numerous specification changes, which has reduced its reliability.
For this reason, I plan to rewrite this document. Please wait for a while.
Issue: #3
OpenAPI Documents --> Coming soon
Table of contents
- Pixiv Ajax API
- Note
- Ajax API Base URL
- CORS
- Authorization
- Top Page
- User Information
- Get user information (short)
- Get user information (full)
- Get user information (focus on artwork)
- Get following users
- Get user's followers
- Get user latest artworks
- Get user bookmarks
- Get users who are live steaming
- Get your own user extra data
- Get new artwork from users you follow
- Get manga on your watchlist
- Get your mypic artworks
- User Dashboard
- Artworks
- Tags
- Ranking
- Search
- Requests
- Get all request information
- Get the completed request illusts
- Get the completed request manga
- Get the completed request ugoira
- Get users who have posted requested illusts
- Get users who have posted requested manga
- Get users who have posted requested ugoira
- Get request artworks in progress
- Get request illusts in progress
- Get request manga in progress
- Get request ugoira in progress
- Discovery
- New artworks
- Miscellaneous
This document was created and published for research purposes only. This document is unofficial and in no way affiliated with pixiv. Misuse of the API by this document is prohibited.
https://www.pixiv.net/ajax
The pixiv Ajax API does probably not support CORS and there is no Access-Control-Allow-Origin
in the HTTP header of the response. Therefore, to use the pixiv Ajax API in a web browser, you must use a proxy that provides CORS headers.
Authorization is required to use some parameters of the pixiv Ajax API.
I recommend specifying a User-Agent when sending requests to the API. (User-Agent: {USER-AGENT}
)
Here is an example of User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
(Windows 10 64-bit, Chrome v104)
First, log in to pixiv with a browser and get the Cookie data. Then, add the saved Cookie data to the request header to the API and send. (Cookie: {RAW_COOKIE_DATA}
)
Cookie data can be obtained using Chrome/Firefox developer tools. For iOS, you can use Proxyman to get the Cookie data.
There are some endpoints that cannot be used by this method alone. For example, the endpoint that uses the POST
.
First, log in to pixiv with a browser and get the PHPSESSID
data. Then, add the saved PHPSESSID
data to the request header to the API and send. (Cookie: PHPSESSID={PHPSESSID}
)
PHPSESSID
data can be obtained using Chrome/Firefox developer tools. For iOS, you can use Proxyman to get the PHPSESSID
data.
There are some endpoints that cannot be used by this method alone.
Get the information in the top page.
Get the artworks in the top page.
Login authorization is required.
https://www.pixiv.net/ajax/top/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
Get user information in various formats.
Get user information in a simplified format.
https://www.pixiv.net/ajax/user/{USER_ID}
Method: GET
Referer: https://www.pixiv.net/member.php?id={USER_ID}
Get full user information.
https://www.pixiv.net/ajax/user/{USER_ID}?full=1
Method: GET
Referer: https://www.pixiv.net/member.php?id={USER_ID}
Get user information along with information about artwork posted by the user.
https://www.pixiv.net/ajax/user/{USER_ID}/profile/all
Method: GET
Referer: https://www.pixiv.net/member.php?id={USER_ID}
Get following users.
Login authorization is required.
https://www.pixiv.net/ajax/user/{USER_ID}/following?offset={OFFSET_COUNT}&limit={LIMIT_COUNT}&rest=show
Method: GET
Referer: https://www.pixiv.net/
Example response
https://www.pixiv.net/ajax/user/9153585/following?offset=0&limit=3&rest=show
Get user's followers.
Login authorization is required.
https://www.pixiv.net/ajax/user/{USER_ID}/followers?offset={OFFSET_COUNT}&limit={LIMIT_COUNT}
Method: GET
Referer: https://www.pixiv.net/
Get the latest artworks of users.
https://www.pixiv.net/ajax/user/{USER_ID}/works/latest
Method: GET
Referer: https://www.pixiv.net/
Get bookmarks of users.
Login authorization is required.
https://www.pixiv.net/ajax/user/{USER_ID}/illusts/bookmarks?tag={TAG}&offset={OFFSET_COUNT}&limit={LIMIT_COUNT}&rest=show
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
tag | string | Specify tags. Even if you do not specify a tag, you must include an empty tag in your query. |
Example response
https://www.pixiv.net/ajax/user/43192924/illusts/bookmarks?tag=&offset=0&limit=3&rest=show
Get users you are following who are live streaming.
Login authorization is required.
https://www.pixiv.net/ajax/sketch/live/following
Method: GET
Referer: https://www.pixiv.net/
Get your own user extra data.
Login authorization is required.
https://www.pixiv.net/ajax/user/extra
Method: GET
Referer: https://www.pixiv.net/
Get new artwork from users you follow.
Login authorization is required.
https://www.pixiv.net/ajax/follow_latest/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
|
p | integer | Specifies the page number. |
Get manga on your watchlist.
Login authorization is required.
https://www.pixiv.net/ajax/watch_list/manga
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
p | integer | Specifies the page number. |
Get your mypic artworks.
Login authorization is required.
https://www.pixiv.net/ajax/mypixiv_latest/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
p | integer | Specifies the page number. |
Get user dashboard information.
Get your dashboard home information.
https://www.pixiv.net/ajax/dashboard/home
Method: GET
Referer: https://www.pixiv.net/
Get your dashboard settings.
https://www.pixiv.net/ajax/dashboard/settings
Method: GET
Referer: https://www.pixiv.net/
Get your illust request strategy
https://www.pixiv.net/ajax/dashboard/works/illust/request_strategy
Method: GET
Referer: https://www.pixiv.net/
Get various information about the artwork.
Get artwork information.
https://www.pixiv.net/ajax/illust/{ARTWORK_ID}
Method: GET
Referer: https://www.pixiv.net/artworks/{ARTWORK_ID}
Get the comments posted to the artwork.
https://www.pixiv.net/ajax/illusts/comments/roots?illust_id={ARTWORK_ID}&offset={OFFSET_COUNT}&limit={LIMIT_COUNT}
Method: GET
Referer: https://www.pixiv.net/artworks/{ARTWORK_ID}
Example response
https://www.pixiv.net/ajax/illusts/comments/roots?illust_id=100412238&offset=0&limit=3
Get image URL of artwork.
https://www.pixiv.net/ajax/illust/{ARTWORK_ID}/pages
Method: GET
Referer: https://www.pixiv.net/artworks/{ARTWORK_ID}
Get recommendations related to artwork.
Login authorization is required.
https://www.pixiv.net/ajax/illust/{ARTWORK_ID}/recommend/init?limit=[LIMIT_COUNT]
Method: GET
Referer: https://www.pixiv.net/artworks/{ARTWORK_ID}
Add an artwork to bookmarks.
Login authorization is required.
https://www.pixiv.net/ajax/illusts/bookmarks/add
Method: POST
Request body type: application/json
Referer: https://www.pixiv.net/
Request body parameters:
Key | Type | Info |
---|---|---|
comment | string | Specify the comment on the bookmark. |
illust_id | integer | Specify the artwork ID. |
restrict | 0 ,1 |
If you specify 0 , the privacy settings of the bookmark will be "public". If you specify 1 , the privacy settings of the bookmark will be "private". |
tags | list(string) | Specify the tag to be added to the bookmark. |
Example response
https://www.pixiv.net/ajax/illusts/bookmarks/add
{
"comment": "",
"illust_id": "101026657",
"restrict": 0,
"tags": []
}
Like an artwork.
Login authorization is required.
https://www.pixiv.net/ajax/illusts/like
Method: POST
Request body type: application/json
Referer: https://www.pixiv.net/
Request body parameters:
Key | Type | Info |
---|---|---|
illust_id | integer | Specify the artwork ID. |
Get tags information.
Get detailed information of a tag.
https://www.pixiv.net/ajax/search/tags/{TAG_NAME}
Method: GET
Referer: https://www.pixiv.net/
Get tag storyId.
https://www.pixiv.net/ajax/stories/tag_stories?tag={TAG_NAME}
Method: GET
Referer: https://www.pixiv.net/
Example response
https://www.pixiv.net/ajax/stories/tag_stories?tag=%E5%8E%9F%E7%A5%9E
Get artwork ranking data.
Get artwork ranking data.
Ajax API base URL is not used.
https://www.pixiv.net/ranking.php
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
format | json |
You can only use json . |
mode | daily ,weekly ,monthly ,male ,female ,rookie ,original ,daily_r18 ,weekly_r18 ,male_r18 ,female_r18 |
r18 cannot be used without login authorization. |
date | yyyymmdd | Used to get the ranking of the specified date. If not specified, get the latest ranking. |
content | complex ,illust ,ugoira ,manga |
Filter the rankings by artwork type. If complex is specified, filtering will be canceled. |
p | integer | Specifies the page number. Get 50 artwork per page. |
Example response
https://www.pixiv.net/ranking.php?format=json&mode=weekly&content=illust&p=1
Search artworks.
Search various types of top artworks.
https://www.pixiv.net/ajax/search/top/{KEYWORD}
Method: GET
Referer: https://www.pixiv.net/
Search artworks.
https://www.pixiv.net/ajax/search/artworks/{KEYWORD}?word={KEYWORD}
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
type | all |
You can only use all . |
order | date_d ,date ,popular_d ,popular ,popular_male_d ,popular_male ,popular_female_d ,popular_female |
Premium account authorization is required to use popular* . |
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
s_mode | s_tag_full ,s_tag ,s_tc |
Specify s_tag_full to search by tag (exact match). Specify s_tag to search by tag (partial match). Specify s_tc to search by title or caption. |
wlt | integer | Filter by minimum image width. If not specified, the filter will be disabled. |
wgt | integer | Filter by maximum image width. If not specified, the filter will be disabled. |
hlt | integer | Filter by minimum image height. If not specified, the filter will be disabled. |
hgt | integer | Filter by maximum image height. If not specified, the filter will be disabled. |
ratio | number | Filter by the image aspect ratio. -0.5 is portrait, 0 is square, 0.5 is landscape. If not specified, the filter will be disabled. |
tool | string | Filter by production tools. e.g. Photoshop |
scd | yyyy-mm-dd | Get artwork posted after the specified date. If not specified, the filter will be disabled. |
ecd | yyyy-mm-dd | Get artwork posted before the specified date. If not specified, the filter will be disabled. |
blt | integer | Filter by minimum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
bgt | integer | Filter by maximum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/search/artworks/%E5%8E%9F%E7%A5%9E?word=%E5%8E%9F%E7%A5%9E&type=all&order=date_d&mode=all&s_mode=s_tag_full
Search illustrations among artworks.
https://www.pixiv.net/ajax/search/illustrations/{KEYWORD}?word={KEYWORD}
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
type | illust_and_ugoira ,illust ,ugoira |
Specify search target. |
order | date_d ,date ,popular_d ,popular ,popular_male_d ,popular_male ,popular_female_d ,popular_female |
Premium account authorization is required to use popular* . |
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
s_mode | s_tag_full ,s_tag ,s_tc |
Specify s_tag_full to search by tag (exact match). Specify s_tag to search by tag (partial match). Specify s_tc to search by title or caption. |
wlt | integer | Filter by minimum image width. If not specified, the filter will be disabled. |
wgt | integer | Filter by maximum image width. If not specified, the filter will be disabled. |
hlt | integer | Filter by minimum image height. If not specified, the filter will be disabled. |
hgt | integer | Filter by maximum image height. If not specified, the filter will be disabled. |
ratio | number | Filter by the image aspect ratio. -0.5 is portrait, 0 is square, 0.5 is landscape. If not specified, the filter will be disabled. |
tool | string | Filter by production tools. e.g. Photoshop |
scd | yyyy-mm-dd | Get artwork posted after the specified date. If not specified, the filter will be disabled. |
ecd | yyyy-mm-dd | Get artwork posted before the specified date. If not specified, the filter will be disabled. |
blt | integer | Filter by minimum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
bgt | integer | Filter by maximum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/search/illustrations/%E5%8E%9F%E7%A5%9E?word=%E5%8E%9F%E7%A5%9E&type=illust_and_ugoira&order=date_d&mode=all&s_mode=s_tag_full
Search manga among artworks.
https://www.pixiv.net/ajax/search/manga/{KEYWORD}?word={KEYWORD}
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
type | manga |
You can only use manga . |
order | date_d ,date ,popular_d ,popular ,popular_male_d ,popular_male ,popular_female_d ,popular_female |
Premium account authorization is required to use popular* . |
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
s_mode | s_tag_full ,s_tag ,s_tc |
Specify s_tag_full to search by tag (exact match). Specify s_tag to search by tag (partial match). Specify s_tc to search by title or caption. |
work_lang | string | Filter by the language of the text in artwork. Specify a two-letter language code. Japanese is ja . |
wlt | integer | Filter by minimum image width. If not specified, the filter will be disabled. |
wgt | integer | Filter by maximum image width. If not specified, the filter will be disabled. |
hlt | integer | Filter by minimum image height. If not specified, the filter will be disabled. |
hgt | integer | Filter by maximum image height. If not specified, the filter will be disabled. |
ratio | number | Filter by the image aspect ratio. -0.5 is portrait, 0 is square, 0.5 is landscape. If not specified, the filter will be disabled. |
tool | string | Filter by production tools. e.g. Photoshop |
scd | yyyy-mm-dd | Get artwork posted after the specified date. If not specified, the filter will be disabled. |
ecd | yyyy-mm-dd | Get artwork posted before the specified date. If not specified, the filter will be disabled. |
blt | integer | Filter by minimum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
bgt | integer | Filter by maximum number of bookmarks. Premium account authorization is required. If not specified, the filter will be disabled. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/search/manga/%E5%8E%9F%E7%A5%9E?word=%E5%8E%9F%E7%A5%9E&type=manga&order=date_d&mode=all&s_mode=s_tag_full&p=1
Get the request artworks.
Get all request information
https://www.pixiv.net/ajax/commission/page/request
Method: GET
Referer: https://www.pixiv.net/
Get the completed request illusts.
https://www.pixiv.net/ajax/commission/page/request/complete/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/complete/illust?mode=all&p=1
Get the completed request manga
https://www.pixiv.net/ajax/commission/page/request/complete/manga
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/complete/manga?mode=all&p=1
Get the completed request ugoira
https://www.pixiv.net/ajax/commission/page/request/complete/ugoira
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/complete/ugoira?mode=all&p=1
Get users who have posted requested illusts.
https://www.pixiv.net/ajax/commission/page/request/creators/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/creators/illust?mode=all&p=1
Get users who have posted requested manga.
https://www.pixiv.net/ajax/commission/page/request/creators/manga
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/creators/manga?mode=all&p=1
Get users who have posted requested ugoira.
https://www.pixiv.net/ajax/commission/page/request/creators/ugoira
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/creators/ugoira?mode=all&p=1
Get request artworks in progress.
https://www.pixiv.net/ajax/commission/page/request/in_progress/all
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/in_progress/all?mode=all&p=1
Get request illusts in progress.
https://www.pixiv.net/ajax/commission/page/request/in_progress/illust
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/in_progress/illust?mode=all&p=1
Get request manga in progress.
https://www.pixiv.net/ajax/commission/page/request/in_progress/manga
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/in_progress/manga?mode=all&p=1
Get request ugoira in progress.
https://www.pixiv.net/ajax/commission/page/request/in_progress/ugoira
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
r18 cannot be used without login authorization. |
p | integer | Specifies the page number. |
Example response
https://www.pixiv.net/ajax/commission/page/request/in_progress/ugoira?mode=all&p=1
Get artworks of Discovery page.
Login authorization is required.
https://www.pixiv.net/ajax/discovery/artworks?limit={LIMIT_COUNT}
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
Get users of Discovery page.
Login authorization is required.
https://www.pixiv.net/ajax/discovery/users?limit={LIMIT_COUNT}
Method: GET
Referer: https://www.pixiv.net/
Get page meta info of Discovery artworks page.
Login authorization is required.
https://www.pixiv.net/ajax/discovery/artworks/meta
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
mode | all ,safe ,r18 |
Get page meta info of Discovery users page.
Login authorization is required.
https://www.pixiv.net/ajax/discovery/users/meta
Method: GET
Referer: https://www.pixiv.net/
Get new artwork information.
Get new artworks.
https://www.pixiv.net/ajax/illust/new?lastId=0&limit={LIMIT_COUNT}
Method: GET
Referer: https://www.pixiv.net/
Additional parameters:
Key | Type | Info |
---|---|---|
type | illust ,manga |
Specifies the type of artworks. |
r18 | boolean | Specify whether to include the R18 artworks. |
Example response
https://www.pixiv.net/ajax/illust/new?lastId=0&limit=20&type=illust&r18=false
Get miscellaneous data.
Get webpush
information.
https://www.pixiv.net/ajax/webpush
Method: GET
Referer: https://www.pixiv.net/
Get notifications.
Login authorization is required.
https://www.pixiv.net/ajax/notification
Method: GET
Referer: https://www.pixiv.net/
Get linked_service
information.
Login authorization is required.
https://www.pixiv.net/ajax/linked_service/tumeng?page={PAGE_COUNT}
Method: GET
Referer: https://www.pixiv.net/