#4778 closed defect (bug) (fixed)
/plugins/info/1.2 failed to return all plugins
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | API | Keywords: | |
Cc: |
Description
When I access https://api.wordpress.org/plugins/info/1.2/?action=query_plugins it shows me the total number 61849. But if I actually traverse through all page, there are lots of index missing and in total it only returns 48k-49k plugin lists only.
GET https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[page]=1&&request[per_page]=250 { "page":1, "pages":248, "results":61849, "plugins": [plugin JSON] }
So it's obvious that some plugins are being excluded or the total "results" value is wrong. So it's very inconsistent. Isn't it?
Change History (4)
#2
@
5 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 9227:
#3
@
5 years ago
The query API was retuning plugins with a status in [publish, closed, disabled]
but the information endpoint only returned publish
which caused some results to get stripped from the response.
The API response now looks like this:
GET https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[page]=1&&request[per_page]=250 { "info": { "page": 1, "pages": 195, "results": 48609 }, "plugins": [...] }
Due to caching you'll probably see the 68k and higher page numbers in the API response for the next few hours until they naturally refresh.
Yes, the actual number of plugins is 54858, at present. There are indeed many hidden, the actual number is in the 85k range.
Plugins that have been closed over time, plugins that have been submitted but not reviewed, plugins that have simply never been uploaded to the SVN after being reviewed, these all throw the numbers out of whack. There are plugin results which you will not be shown for a lot of reasons.
The numbers given by the API are not consistent, nor do they really need to be since the API isn't mean to be used to query the whole space of plugins, nor to pull all the data about all the plugins down from the system. Also, I thought that the paging was limited at 100 pages of plugins, actually, not 250, but that seems about right.
Note that the 54k number I gave above includes plugins that were reviewed, approved, but then never uploaded and thus are not "live". Putting the difference from that at about 5k seems about correct to me. So the 48-49k plugins you found may indeed be correct.