§
يوللانغان ۋاقتى: 2022-02-25

What are the available APIs to get data from GreasyFork besides by-site.json?

§
يوللانغان ۋاقتى: 2022-02-25

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?

§
يوللانغان ۋاقتى: 2022-02-26

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.

§
يوللانغان ۋاقتى: 2022-02-26

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.

§
يوللانغان ۋاقتى: 2022-02-26

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?

§
يوللانغان ۋاقتى: 2022-03-02

The JSON endpoint was missing for this. I've added it, in the normal way (add .json to the URL).

§
يوللانغان ۋاقتى: 2022-03-02

Great. Thank you.

§
يوللانغان ۋاقتى: 2022-03-02

The JSON only returns 50 items which is not suitable for the required purpose.

§
يوللانغان ۋاقتى: 2022-03-08

The JSON results should be paginatable with the same parameters as the HTML results.

§
يوللانغان ۋاقتى: 2023-06-12

@JasonBarnabe

Thanks!

If you could let me know when that gets implemented I would appreciate

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.