# getJSON not fetching new data

**URL:** <https://forum.freecodecamp.org/t/getjson-not-fetching-new-data/153148>\
**Category:** General\
**Created:** [October 14, 2017, 2:52pm UTC](https://forum.freecodecamp.org/t/getjson-not-fetching-new-data/153148 "2017-10-14T14:52:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbxnr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dbxnr/32/68435_2.png) [@dbxnr](https://forum.freecodecamp.org/u/dbxnr)\
**Post date:** [October 14, 2017, 2:52pm UTC](https://forum.freecodecamp.org/t/getjson-not-fetching-new-data/153148/1 "2017-10-14T14:52:11Z")

</div>

Hello,  
I’m working on the quote generator and am having some problems with my getJSON requests - they seem to be returning the same value every time through CodePen but different ones with my browser. Everything seems to be working correctly with it, but for the fact the same quote is returned each time… Any help you be appreciated.

```auto
$(document).ready(function () {
    $("#quoteButton").click(function () {
        jQuery.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function (a) {
            quoteText.innerHTML = (a[0].content);
            authorName.innerHTML = (a[0].title);
        });
    });
});

```

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [October 14, 2017, 2:55pm UTC](https://forum.freecodecamp.org/t/getjson-not-fetching-new-data/153148/2 "2017-10-14T14:55:06Z")

</div>

> [@\[Quote Machine\] - Every quote I get through API is the same quote](https://forum.freecodecamp.org/t/quote-machine-every-quote-i-get-through-api-is-the-same-quote/149040):
>
> Hi guys, I completed the Quote Machine App except it’s not working correctly. I have used this API: [https://quotesondesign.com/api-v4-0/](https://quotesondesign.com/api-v4-0/) It says that this link: [http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts\_per\_page]=1](http://quotesondesign.com/wp-json/posts?filter%5Borderby%5D=rand&filter%5Bposts_per_page%5D=1) Should give me 1 random quote. It does but after I have this quote and call it again it’s the exact same quote. Here is my CodePen: [https://codepen.io/GeraltDieSocke/pen/OxXJJr](https://codepen.io/GeraltDieSocke/pen/OxXJJr) Can anyone tell me what’s going on?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:37pm UTC](https://forum.freecodecamp.org/t/getjson-not-fetching-new-data/153148/3 "2021-01-17T20:37:32Z")

</div>

Closed on January 17, 2021, 8:37pm UTC


