{"id":22562233,"url":"https://github.com/preciz/common_crawl","last_synced_at":"2025-04-10T10:33:00.883Z","repository":{"id":263660814,"uuid":"434268832","full_name":"preciz/common_crawl","owner":"preciz","description":"Work with Common Crawl data from Elixir. ","archived":false,"fork":false,"pushed_at":"2025-03-19T13:19:09.000Z","size":187,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T14:26:48.419Z","etag":null,"topics":["commoncrawl","elixir"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/common_crawl","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preciz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-02T15:11:40.000Z","updated_at":"2025-03-19T13:19:06.000Z","dependencies_parsed_at":"2024-11-19T19:25:50.889Z","dependency_job_id":"5f1416c4-cc71-4467-993f-bb460b6a6a0f","html_url":"https://github.com/preciz/common_crawl","commit_stats":null,"previous_names":["preciz/common_crawl"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fcommon_crawl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fcommon_crawl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fcommon_crawl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fcommon_crawl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preciz","download_url":"https://codeload.github.com/preciz/common_crawl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commoncrawl","elixir"],"created_at":"2024-12-07T22:12:09.321Z","updated_at":"2025-04-10T10:33:00.873Z","avatar_url":"https://github.com/preciz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommonCrawl\n\n[![test](https://github.com/preciz/common_crawl/actions/workflows/test.yml/badge.svg)](https://github.com/preciz/common_crawl/actions/workflows/test.yml)\n\nWork with Common Crawl data from Elixir.\n\n## Installation\n\nAdd `common_crawl` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:common_crawl, \"~\u003e 0.3.0\"}\n  ]\nend\n```\n\n## Usage Examples\n\n```elixir\n# Get latest available crawl of a URL\n{:ok, %{response: _, headers: _, warc: _}} = CommonCrawl.get_latest_for_url(\"https://example.com\")\n\n# Get list of available crawls\ncrawls = CommonCrawl.collinfo()\n\n# Search for URLs in the index\ncrawl = List.first(crawls)\n{:ok, results} = CommonCrawl.IndexAPI.get(crawl[\"cdx-api\"], %{\n  \"url\" =\u003e \"example.com/*\",\n  \"output\" =\u003e \"json\"\n})\n\n# Download webpage content from WARC file\n{url, timestamp, metadata} = List.first(results)\n{:ok, segment} = CommonCrawl.WARC.get_segment(\n  metadata[\"filename\"],\n  metadata[\"offset\"],\n  metadata[\"length\"]\n)\n\n# Stream all entries from index files\nCommonCrawl.Index.stream(\"CC-MAIN-2024-51\")\n|\u003e Stream.filter(fn {_key, _timestamp, metadata} -\u003e\n  metadata[\"status\"] == \"200\"\nend)\n|\u003e Enum.take(10)\n\n# Work with raw index files\n{:ok, index_paths} = CommonCrawl.Index.get_all_paths(\"CC-MAIN-2021-43\")\n{:ok, index_file} = CommonCrawl.Index.get(\"CC-MAIN-2021-43\", List.first(index_paths))\n```\n\n## Docs\nDocumentation can be found at [https://hexdocs.pm/common_crawl](https://hexdocs.pm/common_crawl).\n\n## License\nCommonCrawl is [MIT Licensed](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreciz%2Fcommon_crawl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreciz%2Fcommon_crawl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreciz%2Fcommon_crawl/lists"}