GreasyFork API
Various things are available as JSON/JSONP - individual scripts, lists of scripts, and individual users. These are generally indicated with <link rel="alternate">
.
Is there something specific you're looking for?
I came across by-site.json
by accident. I looked around the site to see if there are others but couldn't find any. I was wondering if there were more?
Based on your post, I found script.json
& user.json
as well.
TBH, I am more interested in the metadata blocks & code.
Is there a way to search the metadata block?
Is it possible to search the code using AND (using more than one search parameter?
Yesterday, I manually looked at all 30 userscripts that have GM.getResourceUrl
. Half of them declare but never use it.
I tried searching for GM.getResourceUrl @resource
or a search that can check if GM.getResourceUrl
was used more than once, but couldn't.
I am checking compatibility data since the implementation of GM_getResourceText
, GM.getResourceUrl
& GM_getResourceURL
in FireMonkey is different comparing to GM|TM|VM.
AFA GM.getResourceUrl
(30) I found out that all are compatible with FM.
In case of GM_getResourceText
(954) GM_getResourceURL
(355), most are compatible with FM but only checked some random ones.
PS. I found a number of userscripts that @resource
duplicate files (e.g. 424574) or @require
duplicate files (e.g. 14178, 424574) which creates needless load (getting, storing, loading) for users.
There is currently no way to search only metadata or to search for multiple things in code. Code search is less functional than text search due to the sheer amount of data it has to go through.
You could use the JSON response for code search to get a list of scripts for further inspection, or to find which scripts match two separate searches.
You could use the JSON response for code search to get a list of scripts for further inspection, or to find which scripts match two separate searches.
That would be good. What is the parameter to get JSON response in code search?
The JSON endpoint was missing for this. I've added it, in the normal way (add .json to the URL).
Great. Thank you.
The JSON only returns 50 items which is not suitable for the required purpose.
The JSON results should be paginatable with the same parameters as the HTML results.
@JasonBarnabe
Could we please also have sorting endpoints too?
like
https://greasyfork.org/en/users/670188-hacker09.jsonp?sort=created
https://greasyfork.org/en/users/670188-hacker09.jsonp?callback=created
What are the available APIs to get data from GreasyFork besides
by-site.json
?