Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

About the Common Crawl Data Set

  • number of years
  • size
  • link back to website

File Locations

The entire Common Crawl data set is stored on Amazon S3 as an Public Data Set.

  http://aws.amazon.com/datasets/41740

The directory structure is as follows:

  Crawl #1 - s3://aws-publicdatasets/common-crawl/crawl-001/
  Crawl #2 - s3://aws-publicdatasets/common-crawl/crawl-002/
  Crawl #3 - s3://aws-publicdatasets/common-crawl/parse-output/

General

.

ARC Files - Raw Content

ARC files contain the full HTTP response & payload for all pages crawled.

Text Only files are saved as Hadoop SequenceFiles using GZIP compression.  The key and value data types are both Text.  The key in these files is the URL, and the value is the actual text content.  From HTML pages, the text content includes the page title, the page meta description content, and all text content from the HTML body.  They are located in the segment directories, with a file name of "textData-nnnnn".  For example:

  s3://aws-publicdatasets/common-crawl/parse-output/segment/1341690169105/1341826131693_45.arc.gz

in the segment directories, with a file name of "textData-nnnnn".  For example:

 

Text Files - Text Only

Common Crawl also produces a series of text only files.  These files take content returned as HTML or RSS and parse out just the text content - making it easier for researchers to perform text-based analysis.

Text Only files are saved as Hadoop SequenceFiles using GZIP compression.  The key and value data types are both Text.  The key in these files is the URL, and the value is the actual text content.  From HTML pages, the text content includes the page title, the page meta description content, and all text content from the HTML body.  They are located in the segment directories, with a file name of "textData-nnnnn".  For example:

  s3://aws-publicdatasets/common-crawl/parse-output/segment/1341690169105/textData-00112

The numbers at the end of the filename are sequentially assigned to Text Only files within the segment - they have not specific meaning.

Further, Text Only files are translated from their native character sets into UTF-8.  All Text Only content (in all languages) can be read using the UTF-8 character set.

Currently, we are only producing Text Only files from HTML and RSS/Atom content.  The Text Only output is files are on average 20% of the size of the raw content.


Metadata

Hello

The metadata file contains, for every URL crawled, Crawl Status (successfuy crawled or, if not, the reason why not), HTTP headers, text encoding, document md5, sim-hash if text content, and all links found in the document. Each link contains not only the related URL, but also the context for the link (tag type, attributes and text associated with the link). All of this information is encoded using JSON instead of a proprietary data structure, making it easily consumable by a host of languages and environments. This data is stored in a SequenceFile, making it easy to feed it into a Hadoop job, and is usually a fifth of the size of the comparable raw compressed content. Our hope is that by making metadata available in a convenient format, part of the community that is interested in building a graph of the Web will be able to do so without incurring the overhead,headache, and cost of processing raw content. Currently we emit metadata for only HTML and Feed (Atom and RSS) content. The JSON schema for the generated metadata can be found at the end of this post.

------------------------------

Metadata File Format

The filename prefix for the metadata file is "metadata-". The metadata file is written out as a SequenceFile using GZIP compression. The Key and Value data types are TextBytes. They Key represents the source URL, and the Value represents the JSON encoded metadata for the source URL.

JSON Metadata Schema

Basic JSON data metadata attributes:

"attempt_time": "Time (unix time) for the crawl attempt."
"disposition": "SUCCESS (if the crawler got a valid HTTP result) or FAILURE(if not)."
"failure_reason": "Short (enumerated) reason why the crawl failed."
"failure_detail": "More detail (if available) on why the crawl failed."

Extended JSON metadata attributes for urls that received a valid HTTP response:

"server_ip": "The IP Address of the HTTP Server that returned a successful HTTP response."
"http_result": "The HTTP result code"
"http_headers": "A JSON object consisting of the HTTP Header key/value pairs returned by the server."
"redirect_from": "A JSON object representing the source of the final URL and document (if it originated via a redirect)."
"content_len": "The content length, as advertised by the server"
"mime_type": "The mime-type returned via the HTTP headers (stripped of charset)."
"download_size": "The actual size of the downloaded content."
"content_is_gzip": "Optional attribute that specifies that source content was gzip'd."
"gunzip_content_len": "If the content was gzip'd, this is the decompressed length of the incoming content."
"md5": "md5 hash of the incoming content."
"charset_detected": "The charset that we detected for the download content."
"charset_detector": "0 if from headers,1 if from Meta tags,2 if ICU detector used, 3 if Mozilla detector used, 10 if no match and ISO-8895-1 used."
"text_simhash": "A 64 bit simhash of the text (UCS-2) content if document was a valid text type."
"parsed_as": "html - if document was parsed as html document, feed - if document was parsed as an Atom or RSS feed."
"content": "If the http response was 20x, as the document was parsed as html or a feed, the JSON object represent the document metadata."

The details of the content JSON object if the document was an HTML document:

"type": "html-doc"
"title": "The document title (if present)."
"meta_tags": "A JSON array of objects representing each Meta tag discovered by the parser."
"links": "A JSON array of objects representing each Link discovered by the parser." 

Link JSON object attributes:

"type": "a if anchor tag,area if area tag,frame if frame tag,iframe if iframe tag,script if script tag,img if img tag, and link if link tag and no type attribute in link, otherwise the value of type attribute of the link tag." "href": "The url associated with the link." "text": "The text contents of the anchor tag." "[other attributes]": "Every other attribute in the original link tag gets represented as a property/value pair in the JSON object."

In addition to content files, Common Crawl produces a series of metadata files that provide useful information about the crawled content.  For each URL, the

Records in the Metadata files are in the same order and have the same file numbers as the Text Only content.

Metadata files are saved as Hadoop SequenceFiles using GZIP compression.  The key and value data types are also both Text.  The key in these files is the URL, and the value is a JSON structure of fields and subfields - the full structure is defined below..  Just like the Text Only files, the Metadata files are located in the segment directories, with a file name of "metadata-nnnnn".  For example:

  s3://aws-publicdatasets/common-crawl/parse-output/segment/1341690169105/metadata-00112

Currently, we are only producing Metadata from HTML and RSS/Atom content. 

 

Metadata Schema

following attributes:

Attribute NameAttribute DescriptionAvailable
attempt_timeThe time (in UNIX time format) that the crawl of this page was attempted.Always
dispositionSUCCESS if the crawler received a successful HTTP response; FAILURE if not.Always
failure_reasonA code representing why the crawl of this page failed.On Failure
failure_detailA message, if available, on why the crawl of this page failed.On Failure
server_ipThe IP address of the server that returned the response.On Success
http_resultThe HTTP result code.On Success
http_headersA JSON object containing all returned HTTP headers as key/value pairs.On Success
redirect_from  
content_lenThe value of the Content-Length HTTP header.On Success
mime_typeThe value of the Content-Type HTTP header (stripped of the charset).On Success
download_sizeThe actual size of the downloaded content.On Success
content_is_gzipOptional attribute that specifies that source content was gzip'd. 
gunzip_content_lenIf the content was gzip'd, this is the decompressed length of the incoming content. 
md5md5 hash of the incoming content. 
text_simhashA 64 bit simhash of the text (UCS-2) content if document was a valid text type. 
charset_detectedThe character set Common Crawl detected for the downloaded content. 
charset_detector

0 - The character set was derived from an HTTP header.
1 - The character set was derived from an HTML "meta" tag.
2 - The character set was derived from the ICU detector.
3 - The character set was derived from the Mozilla detector.
10 - The character set could not be determined.  ISO-8895-1 is assumed.

 
parsed_ashtml - Downloaded content was parsed as HTML.
feed - Downloaded content was parsed as an RSS/Atom feed.
 
contentIf the http response was 20x, as the document was parsed as html or a feed, the JSON object represent the document metadata. 
content > type  
content > title The value of the HTML "title" tag. 
content > meta_tags

A JSON array of objects representing each "meta" tag found by the parser.

Note:  If the "meta" tag uses a "property" attribute instead of a "name" attribute, "property" is used as the key.

 
content > linksA JSON array of objects representing each link found by the parser. 
content > links > type

The HTML tag type that the link was found in.  Examples:  a, area, frame, iframe, script, img, link, etc.

 
content > links > hrefThe URL associated with the tag, usually from the "href" attribute. 
content > links > textThe text displayed for the link.  Usually the value of the link element. 
content > links > *Every attribute of the link tag is provided. 
   

 



The details of the content JSON object if the document was an RSS feed:

"type": "rss-feed"
"title": "The title attribute of the feed."
"link": "A JSON object representing the link attribute of the feed."
"description": "Feed description"
"updated": "Either LastBuildDate or PubDate, depending on which one is greater."
"categories": "A JSON array representing the category names associated with the feed."
"generator": "The Feed Generator"
"ttl": "The TTL value if specified in the RSS Feed."
"items": "A JSON array of feed items."

Each RSS feed item contains the following attributes:

"title": "The title attribute of the Feed Item."
"description": "Feed Item description."
"link": "A JSON object representing the link attribute of the Feed Item."
"author": "The Feed Item's author."
"categories": "A JSON array representing the category names associated with the Feed Item."
"comments": "The url used to retrieve comments associated with this Feed."
"published": "The PubDate of this Feed Item."
"guid": "The RSS guide representing this Feed Item."
"content": "A JSON object or array of objects that contain any links embedded in the content body of the Feed Item."

The details of the content JSON object if the document was an RSS Atom feed:

"type":

"

rss

atom-feed"


"title":

"The

HTML stripped title

attribute

of

the

feed."


"link":

"A

JSON

object

representing

the

rel=alternate link

attribute

of

the

feed."


"

description

updated":

"

Feed description" "updated": "Either LastBuildDate or PubDate, depending on which one is greater." "categories": "A JSON array representing the category names associated with the feed." "generator": "The Feed Generator" "ttl": "The TTL value if specified in the RSS Feed." "items": "A JSON array of feed items."

Each RSS The Update date of the Feed."
"categories": "A JSON array representing the category names associated with the feed."
"generator": "The Feed Generator"
"authors": "A JSON array of objects representing the Feed's authors."
"items": "A JSON array of Feed Items."

Each Atom feed item contains the following attributes:

"title":

"The

title

attribute

of

the

Feed

Item."


"description":

"Feed

Item

description."


"

link

published":

"A JSON object representing the link attribute of the Feed

"The Published date of this Feed Item."


"

author

updated":

"The

Updated date of this Feed

Item

's author

."


"

categories

link":

"A

JSON

object or array

of objects representing

the category names associated with the Feed

the rel=alternate links in contained in this Feed Item."


"

comments

self":

"The url used to retrieve comments associated with this Feed." "published": "The PubDate of this Feed Item." "guid": "The RSS guide representing this Feed Item." "content": "A JSON object or array of objects that contain any links embedded in the content body of the Feed Item."

The details of the content JSON object if the document was an Atom feed:

"type": "atom-feed"
"title": "The HTML stripped title attribute of the feed."
"link": "A JSON object representing the rel=alternate link attribute of the feed."
"updated": "The Update date of the Feed."
"categories": "A JSON array representing the category names associated with the feed."
"generator": "The Feed Generator"
"authors": "A JSON array of objects representing the Feed's authors."
"items": "A JSON array of Feed Items."

Each Atom feed item contains the following attributes:

"title": "The title attribute of the Feed Item."
"description": "Feed Item description."
"published": "The Published date of this Feed Item."
"updated": "The Updated date of this Feed Item."
"link": "A JSON object or array of objects representing the rel=alternate links in contained in this Feed Item."
"self": "A JSON object or array of objects representing the rel=self links in contained in this Feed Item."
"replies": "A JSON object or array of objects representing the rel=replies links in contained in this Feed Item."
"authors": "A JSON array of objects representing the Feed's authors."
"categories": "A JSON array representing the category names associated with the feed."
"content": "A JSON object that contains any links embedded in the content body of the Feed Item."
"content": "A JSON object or array of objects that contain any links embedded in the content body of the Feed Item."

The JSON data structure for a document that we failed to receive a valid HTTP response for:

{
    "attempt_time": 1328296943586,
    "disposition": "FAILURE",
    "failure_reason": "RedirectFailed",
    "failure_detail": "Alread Visited Redirect Location:http://www.amazon.com/Death-Winter-Star-Generation-Unnumbered/dp/074349721X"
}

A sample JSON data structure for an HTML Document:

{
    "attempt_time": 1328296964112,
    "disposition": "SUCCESS",
    "server_ip": "98.139.126.20",
    "http_result": 200,
    "http_headers": {
        "response": "HTTP/1.1 200 OK",
        "date": "Fri, 03 Feb 2012 19:24:05 GMT",
        "cache-control": "private",
        "x-served-by": "www187.flickr.mud.yahoo.com",
        "vary": "Accept-Encoding",
        "content-type": "text/html; charset\u003dutf-8",
        "age": "0",
        "via": "HTTP/1.1 r46.ycpi.mud.yahoo.net (YahooTrafficServer/1.20.9 [cMsSf ]), HTTP/1.1 r22.ycpi.sp2.yahoo.net (YahooTrafficServer/1.20.9 [cMsSf ])",
        "server": "YTS/1.20.9"
    },
    "content_len": 16092,
    "mime_type": "text/html",
    "download_size": 16092,
    "content_is_gzip": true,
    "gunzip_content_len": 71009
    "md5": "b4da640c09a2704652bb36d7a519c71b",
    "charset_detected": "UTF-8",
    "charset_detector": 0,
    "text_simhash": 9063827461659557026,
    "parsed_as": "html",
    "content": {
        "type": "html-doc",
        "title": "AdriiiiiV\u0027s photosets on Flickr",
        "meta_tags": [
            {
                "name": "name",
                "value": "Flickr is almost certainly the best online photo management and .."
            }
	    ..
        ],
        "links": [
            {
                "type": "link",
                "rel": "apple-touch-icon-precomposed",
                "text": "",
                "href": "http://www.flickr.com/apple-touch-icon.png"
            },
            {
                "type": "script",
                "text": "",
                "href": "http://l.yimg.com/g/combo/1/3.4.0?j/yui/3.4.0/yui/yui-.E.A.vWNh4\u0026j/yui/3.4.0/.FN/.FN-.E.A.vWNh4"
            },
	   ...
}

A sample JSON data structure for an Atom Feed Document:

{ "attempt_time": 1328296939830, "disposition": "SUCCESS", "server_ip": "74.125.53.132", "http_result": 200, "http_headers": { "response": "HTTP/1.1 200 OK", "content-type": "text/xml; charset\u003dUTF-8", "server": "GSE" .. }, "content_len": 523871, "mime_type": "text/xml", "download_size": 523871, "download_truncated": true, "md5": "6145983cbc9787251736c3a90df86e65", "charset_detected": "UTF-8", "charset_detector": 0, "text_simhash": 1373553292315487284, "parsed_as": "feed", "content": { "type": "atom-feed", "title": "Market Talk with Piranha", "link": { "type": "text/html", "href": "http://marketstockwatch.blogspot.com/", "rel": "alternate" }, "authors": [ { "name": "Chris Perruna", "url": "http://www.blogger.com/profile/00976645165089898374" } ], "generator": "Blogger", "updated": 1161695436039, "categories": [], "published": 1148076780000, "items": [ { "title": "My Latest Blog Entries", "description": "", "link": { "type": "text/html", "href": "http://marketstockwatch.blogspot.com/2007/01/my-latest-blog-entries.html", "rel": "alternate", "title": "My Latest Blog Entries" }, "replies": [ { "type": "application/atom+xml", "href": "http://marketstockwatch.blogspot.com/feeds/1858788298009572369/comments/default", "rel": "replies", "title": "Post Comments" }, { "type": "text/html", "href": "http://www.blogger.com/comment.g?blogID\u003d7434962\u0026postID\u003d1858788298009572369", "rel": "replies", "title": "19 Comments" } ], "self": { "type": "application/atom+xml", "href": "http://www.blogger.com/feeds/7434962/posts/default/1858788298009572369", "rel": "self" }, "authors": [ { "name": "Chris Perruna", "url": "http://www.blogger.com/profile/00976645165089898374" } ], "content": { "type": "html-doc", "links": [ { "type": "a", "text": "www.chrisperruna.com", "href": "http://www.chrisperruna.com" }, { "type": "a", "text": "Intercontinental Exchange (ICE) is HOT", "href": "http://www.chrisperruna.com/2007/01/12/intercontinental-exchange-ice-is-hot/" }, .. }

"A JSON object or array of objects representing the rel=self links in contained in this Feed Item."
"replies": "A JSON object or array of objects representing the rel=replies links in contained in this Feed Item."
"authors": "A JSON array of objects representing the Feed's authors."
"categories": "A JSON array representing the category names associated with the feed."
"content": "A JSON object that contains any links embedded in the content body of the Feed Item."
"content": "A JSON object or array of objects that contain any links embedded in the content body of the Feed Item."