Title: How many external requests?
Last modified: March 23, 2018

---

# How many external requests?

 *  Resolved [treeflips](https://wordpress.org/support/users/treeflips/)
 * (@treeflips)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/how-many-external-requests/)
 * Hey guys, I love what you’re doing and glad that you’re bringing some of Social
   Warfare’s features to the public for free.
 * QUESTION/S:
    – I’m guessing this plugin is so fast because your servers gather
   all the [share counts] info and this plugin only calls one request from your 
   server? (instead of making individual requests to each social network’s API?)–
   I saw your pricing on how many API requests a day we can make. Does one pageload
   equal one request? Or is it one pageload X number of networks? – Have more but
   curious how these pan out.
 * Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10146476)
 * Thanks for the kind words!
 * The Shared Counts plugin is not owned or operated by SharedCount.com, but we 
   recommend using that service for the performance reasons you mention.
 * First, we do not refresh the share data on every pageload. We cache the data (
   as post meta) and refresh it:
    – Every 30 minutes for posts published in the 
   last 24 hours – Every 6 hours for posts published in the last 5 days – Every 
   5 days for posts older than that.
 * You can customize how often it is updated by filtering [this function](https://github.com/jaredatch/Shared-Counts/blob/develop/includes/class-shared-counts-core.php#L349-L363).
 * Once we determine a post has “stale” data and needs to be refreshed, we wait 
   until the page is done loading to query the APIs. This ensures the page load 
   for your users isn’t affected.
 * If you’re using SharedCount.com as the data source, it does one query total for
   Facebook, Pinterest, and StumbleUpon. If you check “Include Twitter Counts” and/
   or “Include Yummly Counts”, these are each an additional query (so 3 total if
   all checked).
 * If you check “Preserve HTTP Count” this doubles the query count since it’s duplicating
   those queries for the http version of the URL. So checking this will bring the
   total query count to 2-6 depending on whether you’re retrieving twitter and yummly
   counts. Of those queries, only 1 or 2 will be to SharedCount.com so count towards
   your API limit.
 * You can use [a filter](https://github.com/jaredatch/Shared-Counts/wiki/Preserve-HTTP-Counts)
   to limit the HTTP lookup for posts older than a certain date (when you switched
   to HTTPS) so you aren’t doubling the queries for newer content.
 * With the caching in place, almost every website should be able to use the free
   account at SharedCount. You would need about 50,000 posts to hit the API limit.
 * When you first sign up for SharedCount.com they give you 1,000 queries/day. If
   you connect your Facebook account, they bump it to 10,000 queries/day.
 * Let me know if there’s anything else I can help with.
 *  [Veken](https://wordpress.org/support/users/veken/)
 * (@veken)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10510065)
 * I noticed the code in the last line of this filter had a few typos
    [https://github.com/jaredatch/Shared-Counts/wiki/Preserve-HTTP-Counts](https://github.com/jaredatch/Shared-Counts/wiki/Preserve-HTTP-Counts)
 * add_filter( ‘shared_counts_preserve_http, ‘shareds_count_maybe_preserve_http’,
   10, 2 );
 * should be
 * add_filter( ‘shared_counts_preserve_http’, ‘shared_counts_maybe_preserve_http’,
   10, 2 );
 * add closing ‘
    and “shareds_count” should be “shared_counts”
 * Hopefully that is correct.
    -  This reply was modified 7 years, 9 months ago by [Veken](https://wordpress.org/support/users/veken/).
    -  This reply was modified 7 years, 9 months ago by [Veken](https://wordpress.org/support/users/veken/).
 *  Plugin Contributor [Jared Atchison](https://wordpress.org/support/users/jaredatch/)
 * (@jaredatch)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10510082)
 * Hey veken – thanks for the heads up, really appreciate it. Should be fixed now
   🙂
 *  [Veken](https://wordpress.org/support/users/veken/)
 * (@veken)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10510110)
 * Thanks for the quick reply! looks like it’s still missing the closing apostraphe
   on the first term here:
 * ‘shared_counts_preserve_http, ‘shared_counts_maybe_preserve_http’,
    should be‘
   shared_counts_preserve_http’, ‘shared_counts_maybe_preserve_http’,
 *  Plugin Contributor [Jared Atchison](https://wordpress.org/support/users/jaredatch/)
 * (@jaredatch)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10510199)
 * Thanks, not enough coffee this afternoon!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How many external requests?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shared-counts_7188b5.svg)
 * [Shared Counts - Social Media Share Buttons](https://wordpress.org/plugins/shared-counts/)
 * [Support Threads](https://wordpress.org/support/plugin/shared-counts/)
 * [Active Topics](https://wordpress.org/support/plugin/shared-counts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shared-counts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shared-counts/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Jared Atchison](https://wordpress.org/support/users/jaredatch/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/how-many-external-requests/#post-10510199)
 * Status: resolved