This is a small web-api that implements all functionalities of the original rule34 api, but instead of xml it provides json.
I put it up two times for safety while i tweak stuff. Please always use the first one, if it is up. The second one is only intended as a backup and might not be as reliable by default.
Here are some projects that use the api. Let me know if you are using it and I will add your project.
- /posts - provides images and videos with meta-information
- /tags - provides meta-information about tags
- /alias - returns other names of ambiguous tags
- /images - proxy for content on r34
- /artists - returns artist data. I am not actively using it so it might not.
- /comments - should work. I am not actively using it so it might not.
Posts can be accessed with /posts
or /p
.
- limit - Number of posts to get, capped at 100.
- pid - Specifies the page number.
- tags - Refine your search, seperate multiple tags with
+
. For more details on tags scroll to the bottom. - cid - Change id in Unix time.
- id - Id of the post.
All of these are optional.
https://r34-json.herokuapp.com/posts?tags=dark_skin+female
which will return
{
"count": "74694",
"posts":[ {}, {}, ... ]
}
Posts look like this:
{
"id":"3438787",
"parent_id":"",
"type":"'image' or 'video'",
"score":"1",
"rating":"Explicit",
"source":"either a link or just a string",
"tags":["dark_skin","bedroom", ...],
"file_url":"https://...",
"width":"4776",
"height":"3880",
"sample_url":"https://...",
"sample_width":"850",
"sample_height":"691",
"preview_url":"https://...",
"preview_width":"150",
"preview_height":"121",
"change":"1571510519",
"md5":"548cbcbe722b677836995971a969d62f",
"creator_id":"316656",
"has_children":"false",
"created_at":"Sat Oct 19 18:41:51 +0000 2019",
"status":"active",
"has_notes":"false",
"has_comments":"false",
"comments_url":"https://...",
"creator_url":"https://...",
},
Tags can be accessed with /tags
or /t
.
- type Allows you to filter tags by type. Types include:
general
,artist
,character
,copyright
andambiguous
. - name Allows you to filter tags by name.
https://r34-json.herokuapp.com/tags?type=general
Which will return
[
{
"name":"1girl",
"types":["general"],
"posts":"96854"
},
{
"name":"on_top",
"types":["general"],
"posts":"25901"
},
...
]
Aliases can be accessed with /alias/:tag
.
- :tag The original tag
https://r34-json.herokuapp.com/alias/female
Which will return
[
{"name":"female_fox","posts":359},
{"name":"sheila_female_fox","posts":0}
{"name":"cfnm","posts":1627},
{"name":"cmnf","posts":568},
...
]
Comments can be accessed with /comments
or /c
.
- post_id - Allows you to get all comments of a single post.
https://r34-json.herokuapp.com/comments?post_id=2868605
Tags are very powerful.
- Simple tag:
female
ordark_skin
. - Wildcards:
*_hair
will matchblue_hair
,red_hair
and a bunch of other tags. - Prefixes:
score
is the most useful, others aresource
,width
,height
,user
score:>100
will match post with more than 100 likes.- same works for the others as well