Is there any publicly accessible JSON data source to test with real world data? [closed]

I'm working on a JavaScript dynamically loaded tree view user control. I'd like to test it with real world data.

Does anybody know any public service with an API that provides access to hierarchical data in JSON format?


Solution 1:

Twitter has a public API which returns JSON, for example -

A GET request to:

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=mralexgray&count=1,

EDIT: Removed due to twitter restricting their API with OAUTH requirements...

{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

Replacing it with a simple example of the Github API - that returns a tree, of in this case, my repositories...

https://api.github.com/users/mralexgray/repos

I won't include the output, as it's long.. (returns 30 repos at a time) ... But here is proof of it's tree-ed-ness.

enter image description here

Solution 2:

JSON Test has some

try its free and has other features too.

http://www.jsontest.com/

Solution 3:

Tumblr has a public API that provides JSON. You can get a dump of posts using a simple url like http://puppygifs.tumblr.com/api/read/json.

Solution 4:

Found one from Flickr that doesn't need registration / api.

Basic sample, Fiddle More info: post

// Querystring, "tags" search term, comma delimited
const query = "https://www.flickr.com/services/feeds/photos_public.gne?tags=soccer&format=json&jsoncallback=?";


// This function is called once the call is satisfied
// http://stackoverflow.com/questions/13854250/understanding-cross-domain-xhr-and-xml-data
let mycallback = function(data) {
  // Start putting together the HTML string
  let htmlString = "";

  // Now start cycling through our array of Flickr photo details
  $.each(data.items, function(i, item) {
    // I only want the ickle square thumbnails
    let sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg");

    // Here's where we piece together the HTML
    htmlString += '<li><a href="' + item.link + '" target="_blank">';
    htmlString += '<img title="' + item.title + '" src="' + sourceSquare;
    htmlString += '" alt="';
    htmlString += item.title + '" />';
    htmlString += '</a></li>';

  });

  // Pop our HTML in the #images DIV
  $('#images').html(htmlString);
};


// Ajax call to retrieve data
$.getJSON(query, mycallback);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="images"></div>

Another very interesting is Star Wars Rest API