The Data Collection Handbook · Part I. Foundations

Chapter 2. Legality, Ethics, and Fair Use

In progress: this is the chapter plan. The full chapter, its charts, and its runnable experiment publish on this page.

What this chapter answers

Is this even legal? is the first question every founder in this industry gets asked. The honest answer is: it depends on what you collect, how, and how much. This chapter draws the lines so you can defend your practices to a lawyer, a customer, or the site being collected.

What you will learn

In this chapter

The experiment

The question: What do the world's most-visited websites actually say in their robots.txt files: how many block everything, how many set crawl delays, and which bots do they single out?

A census over a dated snapshot of roughly 500 robots.txt files from a public top-sites list, shipped with the chapter so the result is reproducible offline. The code parses every file and aggregates what sites allow, restrict, and rate-limit, with fetch failures tracked separately so they never pollute the numbers. The data and code ship with the chapter, sized to run offline on a laptop with one command.

My hypothesis is that blanket blocking of all crawlers is rare and most sites express preferences instead. The recent wave of AI-crawler blocks may prove me wrong, and if it does, the chapter will say so: the census reports what the files say, not what I expected them to say.

← Chapter 1. The Data Collection Landscape Chapter 3. Choosing the Access Method →

Get new chapters by email as they publish.