-
Notifications
You must be signed in to change notification settings - Fork 45
Generic JSON Source
The generic JSON source can be used to retrieve images from a wide verity of different JSON APIs but this requires some knowledge of the API that you want to use. If you do not know how these things work and you do not understand this site, then you can simple use the other sources or use the example configurations.
First of all you need a valid URL that responds with a JSON document that contains an URL to the image that you want to use. This is the Request URL.
You also need to specify the JSON Path to the image URL in the response. This is done in a custom query language.
There is also an option for a Image URL prefix for the image URL if the URL does not contain the domain. (e.g. Bing)
$ describes the root element of the response.
Child objects and array elements can be accessed the same way as in JavaScript.
Array access also supports the special index @random which will select a random element of the array. This Can be used if the response contains multiple images.
Example response object:
{
"someKey": [
{
"someOtherKey": "content",
"quality": ["https://example.org/HD1.png", "https://example.org/SD1.png"]
},
{
"someOtherKey": "content",
"quality": ["https://example.org/HD2.png", "https://example.org/SD2.png"]
}
]
}
The select query could look like: $.someKey[@random].quality[0]
https://github.com/dconnolly/chromecast-backgrounds/
- Request URL
https://raw.githubusercontent.com/dconnolly/chromecast-backgrounds/master/backgrounds.json - Image info
- Image JSON Path
$[@random].url
- Image JSON Path
- Author info
- Author JSON Path
$[@random].author
- Author JSON Path
https://api.nasa.gov/api.html#apod
You should replace the DEMO_KEY with a valid API key in the URL.
- Request URL
https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&hd=true - Image info
- Image JSON Path
$.hdurl
- Image JSON Path
https://stackoverflow.com/questions/10639914/is-there-a-way-to-get-bings-photo-of-the-day
- Domain
https://bing.com - Request URL
http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US - Image info
- Image JSON Path
$.images[0].url - Image URL Prefix
https://bing.com
- Image JSON Path
https://earthview.withgoogle.com
- Request URL
https://raw.githubusercontent.com/limhenry/earthview/master/earthview.json - Image info
- Image JSON Path
$[@random].image
- Image JSON Path
Medium: digital2d, digital3d, traditional2d, traditional3d
Categories: fantasy, archviz, comic_art, concept_art, architecture, characters, creatures, environments, game_art, illustration, industrial_design, matte_painting, mecha, science_fiction, still_life, storyboards, storytelling, surreal, texturesmaterials, transport, ui, vr, vfx, weapons
- Domain
https://www.artstation.com - Request URL
https://www.artstation.com/random_project.json?&medium=digital2d&category=fantasy - Image info
- Image JSON Path
$.assets[0].image_url
- Image JSON Path
- Post info
- Post JSON Path
$.permalink
- Post JSON Path
- Author info
- Author JSON Path
$.user.username - Author URL JSON Path
$.user.permalink
- Author JSON Path
You should replace the YOUR_KEY with a valid API key in the URL.
Usage of API: https://wall.alphacoders.com/api.php
- Domain
https://wall.alphacoders.com - Request URL
https://wall.alphacoders.com/api2.0/get.php?auth=YOUR_KEY&method=category&sort=rating&id=3&width=2560&height=1440&operator=equal - Image info
- Image JSON Path
$.wallpapers[@random].url_image
- Image JSON Path
- Post info
- Post JSON Path
$.wallpapers[@random].url_page
- Post JSON Path
- Author info
- Author JSON Path
$.wallpapers[@random].user_name - Author URL JSON Path
$.wallpapers[@random].user_id - Author URL Prefix
https://alphacoders.com/author/view/
- Author JSON Path
https://github.com/matjam/hd-wallpapers
Originally from reddit, will accept PRs. Collection of nice 4K backgrounds.
- Domain
https://github.com/matjam/hd-wallpapers - Request URL
https://raw.githubusercontent.com/matjam/hd-wallpapers/master/backgrounds.json - Image info
- Image JSON Path
$[@random].url
- Image JSON Path
Imageboards based on Moebooru like Konachan and Yandere (currently broken)
API documentation can be found at https://konachan.net/help/api
Possible tags: https://konachan.net/help/cheatsheet
- Domain
https://konachan.net - Request URL
https://konachan.net/post.json?limit=5&page=1&tags=width:>=2560+height:>=1440+order:random+rating:safe - Image info
- Image JSON Path
$[@random].file_url
- Image JSON Path
- Post info
- Post JSON Path
$[@random].id - Post URL Prefix
https://konachan.net/post/show/
- Post JSON Path
- Author info
- Author JSON Path
$[@random].author - Author URL JSON Path
$[@random].creator_id - Author URL Prefix
https://konachan.net/user/show/
- Author JSON Path
Imageboards based on danbooru like danbooru.donmai.us
API documentation can be found at https://danbooru.donmai.us/wiki_pages/help:api
Possible tags and limitations (more than two tags need authentication): https://danbooru.donmai.us/wiki_pages/help:cheatsheet#dtext-n5
- Domain
https://danbooru.donmai.us/ - Request URL
https://danbooru.donmai.us/posts.json?limit=5&page=1tags=ratio:1.5..2+width:>=2560+height:>=1440+order:random+rating:general - Image info
- Image JSON Path
$[@random].file_url
- Image JSON Path
- Post info
- Post JSON Path
$[@random].id - Post URL Prefix
https://danbooru.donmai.us/posts/
- Post JSON Path
- Author info
- Author JSON Path
$[@random].tag_string_artist - Author URL JSON Path
$[@random].uploader_id - Author URL Prefix
https://danbooru.donmai.us/users/
- Author JSON Path
With the deprecation of source.unsplash.com is mandatory to use the Unsplash API, so this is a quick workaround waiting for the official support in the Gnome Extension. Follow Unsplash official instructions to register a Developer Account and obtain an app API Key, then use the Random Photo API to obtain a new wallpaper. Any additional filter (orientation, content_filter, etc.) can be added to Request URL after the count
- Request URL
https://api.unsplash.com/photos/random?client_id=[YOUR_API_KEY_HERE]&count=1 - Image info
- Image JSON Path
$[0].urls.full
- Image JSON Path
- Post info
- Post JSON Path
$[0].links.html
- Post JSON Path
- Author info
- Author JSON Path
$[0].user.name - Author URL JSON Path
$[0].user.links.html
- Author JSON Path