Master's Thesis - using wikipedia contents in application
In a thesis you must reference any material/code that you did not solely created. 

So in your case, I would suggest in the the background chapter, explain, the used data gathering techniques (e.g., using an API), and then add all the required references into it. So in later chapters, the reader knows what are these data and where they came from.