• KZeni


    I’m seeing that Openverse (https://wordpress.org/openverse/) is now part of WordPress’ initiatives (formerly managed by Creative Commons).

    When searching for a plugin that offers Openverse on WP.org (https://wordpress.org/plugins/search/openverse/), it really only comes up with https://wordpress.org/plugins/ls-wp-ccsearch/ (which comes in from when it was CCSearch before Openverse), but it’s not as nice to use and hasn’t been getting much attention from what I’m seeing.

    As such, I’m wondering if Openverse being included alongside Unsplash, Pixabay, Pexels, etc. is something being considered for this plugin (with the Openverse image filters appearing to not otherwise offer these existing sources [with it offering Flickr, Wikipedia, etc. for appropriately licensed assets] so it could be added alongside without overlap, as far as I can tell.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author dcooney


    I didn’t realize Openverse had an API available for public use.

    Do you know, Can you register for an API key without using OAuth2? If not, that could be an issue with integration unless I refactor quite a bit of code.

    Thread Starter KZeni


    I’m not too familiar with Openverse integration, but I’m interested in it & have looked into things a bit more just now.

    I do see https://api.openverse.engineering/v1/, https://github.com/wordpress/openverse-api, and https://github.com/WordPress/openverse-frontend (among elsewhere) have been updated to use WordPress as the owner/maintainer so it looks like the Automattic acquisition isn’t removing what’s there.

    https://api.openverse.engineering/v1/#section/Introduction outlines that this can technically be used as an anonymous user, but it’s rate limited to 100/day and 5/hr. Meanwhile, authorized clients get 10,000/day and 100/min. That said, they then go on to say “Openverse can give your key an even higher limit that fits your application’s needs.”

    https://plugins.trac.wordpress.org/browser/ls-wp-ccsearch/trunk/index.php#L180 (within the lswpcc_search_ajax function) and https://plugins.trac.wordpress.org/browser/ls-wp-ccsearch/trunk/assets/js/backend.js#L15 (where it pulls the providers) has it appear that plugin is using this as an anonymous request. However, that anonymous request limit of 5/hr & 100/day is probably prohibitive for any serious use/integration as that’s likely quickly used up when searching/browsing.

    Now, I did just try variants of https://api.openverse.engineering/v1/images/?format=json&shouldPersistImages=true&q=grass&page_size=20&page=1 with “grass” as a search across all providers (per provider not being specified in the request) just now (went from page 1-10, tried different search terms, etc.) all within a matter of a minute or so and it never failed to return a result so I’m not sure how that rate limiting of anonymous users is actually taking effect (I did find it limits the page_size to 20 as an unauthenticated user, though.)

    If the unauthenticated/anonymous approach is problematic for any reason (it doesn’t appear to be from initial findings with client-based AJAX call for a JSON response with the rate limit not coming into play from what I saw), I suppose OAuth2 may need to be done & possibly have the site self-register upon activation to have each site get its own client access (using the site name, admin email, etc. for the registration details) to open things up further. Otherwise, I’m curious on what Openverse would be open to when they detail that they can unlock limits if a particular application calls for it where this plugin could potentially be given a single set of client access details that simply has unlimited access (if Openverse agrees to it [or see what they recommend instead] via the openverse@wordpress.org contact the API documentation provides.)

    At that point, I’m not 100% sure how that would factor into what this plugin has for its existing providers, but I’m hopeful as this could become the best Openverse option for WordPress (among the other providers already available.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.