File Info & Checksum: Size, MIME Type, SHA-256 for URL Lists avatar

File Info & Checksum: Size, MIME Type, SHA-256 for URL Lists

Pricing

from $0.64 / 1,000 file infos

Go to Apify Store
File Info & Checksum: Size, MIME Type, SHA-256 for URL Lists

File Info & Checksum: Size, MIME Type, SHA-256 for URL Lists

Check file size, MIME type, redirects and last-modified for a list of file URLs using HEAD requests, with an optional streamed SHA-256 and MD5 checksum. Pre-flight for downloads and integrity checks. No download unless you ask for a hash.

Pricing

from $0.64 / 1,000 file infos

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

This file info and checksum checker reads the file size, MIME type, redirect chain and last-modified date of every URL in a list from the HTTP headers, and can stream each file once to compute its SHA-256 and MD5 checksum. No API key. Built as a pre-flight for bulk downloads and as a fingerprint tool for integrity checks.

What it does not do. It does not download or store files: header mode sends a HEAD request (or a 2 KB ranged GET when a server refuses HEAD), and checksum mode streams the file through the hash and discards the bytes. It does not crawl pages or find file links (give it direct file URLs), never logs in, and does not get around blocks: a 401, 403 or 451 gives a blocked row and costs nothing. It follows robots.txt and refuses private or internal addresses. Sizes come from what the server says, so a server that omits or misreports Content-Length gives null or a wrong size (turn on checksums for the measured size). Files over maxHashFileMb (default 100 MB, at most 1,000 MB) are not hashed. It does not scan files for viruses, and MD5 is offered only to compare with legacy checksums, not for security.

What you get

  • Per URL: final URL after redirects with the whole chain, size in bytes, MIME type, charset, file name, extension, last-modified (ISO 8601), ETag, Accept-Ranges, server.
  • Optional: the real file type from the first bytes (pdf, png, zip, html...), with a warning when a server sends an HTML login or error page instead of the file.
  • Optional: SHA-256 and MD5 plus the exact measured size, and duplicateOf when two URLs in the run have identical content.

How to check file size and MIME type from a list of URLs

  1. Paste the file URLs in urls, one per line.
  2. Leave computeHash off and run. Each row has sizeBytes, sizeHuman, contentType, lastModified, redirects and finalUrl.
  3. Filter the dataset (for example sizeBytes above your limit, or contentType not application/pdf) and pass the survivors to Bulk File Downloader: Download Files from URLs to ZIP.

If a server answers HEAD with 405 or 501, or gives no size, the Actor asks for the first 2 KB with a Range request and reads the total size from Content-Range. sizeSource tells you where the number came from: content-length, content-range or measured.

How to get a SHA-256 or MD5 checksum from a URL

Set computeHash to true. Each file is streamed once through SHA-256 and MD5 (nothing is written to disk), sizeBytes becomes the exact number of bytes received, and hashStatus is hashed. Compare sha256 with the value a vendor publishes. Files larger than maxHashFileMb get hashStatus: "skipped-too-large" and keep their header info.

Turn on computeHash (it also reads the first bytes). Rows with the same content share a sha256, and later ones carry duplicateOf with the URL of the first. Dead or fake links show up as http-error, as blocked, or as typeNote such as "The URL ends in .pdf but the file starts like an HTML page". The type check works from the first 2 KB only and covers common formats (PDF, images, ZIP and Office files, gzip, 7z, RAR, audio and video containers, executables, HTML, plain text); unknown formats give detectedType: null.

Input

FieldDefaultWhat it does
urls3 sample filesDirect file links, one per line. Required.
computeHashfalseStream each file to compute SHA-256 and MD5 and the exact size.
maxHashFileMb100Largest file to hash, 1 to 1,000 MB (1 MB = 1,000,000 bytes). Bigger files keep their header info.
sniffTypefalseAlso read the first 2 KB to report the real type. Always on with checksums.
respectRobotstrueSkip URLs that robots.txt disallows for this bot.
maxUrls100Most URLs per run (max 10,000). Extra URLs are skipped and free.
concurrency5URLs processed at once (1 to 20); at most 3 at once per host.
perHostDelayMs200Minimum pause between requests to the same host.
timeoutSecs30Seconds before a header request is abandoned.
hashTimeoutSecs300Seconds before one file's hashing is abandoned.

Input example:

{
"urls": [
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"https://www.w3.org/Icons/w3c_main.png"
],
"computeHash": true
}

Output

From a real run of the input above (shortened):

{
"url": "https://www.w3.org/Icons/w3c_main.png",
"finalUrl": "https://www.w3.org/assets/logos/w3c-2025-transitional/w3c-full-315x48.png",
"status": "ok",
"statusCode": 200,
"redirects": 1,
"redirectChain": [{"url": "https://www.w3.org/Icons/w3c_main.png", "status": 301}],
"fileName": "w3c-full-315x48.png",
"extension": "png",
"sizeBytes": 7816,
"sizeHuman": "7.8 KB",
"sizeSource": "measured",
"contentType": "image/png",
"detectedType": "png",
"lastModified": "2025-10-24T15:06:28+00:00",
"hashStatus": "hashed",
"sha256": "03ab7291bbb7f7e8bb31f13144e107d48293a87e4bcfb2f25e77cdb2f4e183ab",
"md5": "bc9037e9c29da5b58a747ee76fb84e68",
"duplicateOf": null,
"checkedAt": "2026-11-13T05:38:55+00:00"
}

status is ok, http-error, blocked (401/403/451), robots-disallowed, invalid-url or failed. Rows that are not ok explain why in error and are listed in the FAILED record, together with hashes that were skipped or failed. The SUMMARY record counts rows, hashes, duplicates and charges; NOTES lists skipped duplicate URLs and the maxUrls cut.

Use with the Apify API, MCP, n8n and Make

Python:

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/file-info-checksum").call(run_input={
"urls": ["https://example.com/report.pdf"], "computeHash": True})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["url"], row["status"], row["sizeBytes"], row["sha256"])

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/file-info-checksum').call({ urls: ['https://example.com/report.pdf'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();

In n8n or Make use the Apify node with the actor name and the same JSON. Through Apify's MCP server (mcp.apify.com) an AI assistant can ask "how big is this file and what is its SHA-256?". Only URLs are needed.

Use cases

  • Estimate the size of a download list before you run a bulk download, and drop files that are too big or the wrong type.
  • Verify a download against a vendor's published SHA-256 without keeping the file.
  • Fingerprint a set of public files and detect later changes (compare sha256, etag, lastModified).
  • Find duplicate files hidden behind different URLs.
  • Audit links on a site or in a data catalogue: dead, redirected, or serving an HTML page instead of the file.

How much does it cost

Pay per event, no start fee:

  • $0.0008 per URL for header info (file-info, $0.80 per 1,000).
  • $0.002 per URL hashed (file-hashed, $2 per 1,000). It replaces the info charge for that URL.

Free: invalid URLs, duplicates, URLs over maxUrls, robots.txt refusals, HTTP errors, blocked URLs and failures. A file that is too large to hash is charged as info. Plan discounts apply.

  • 1,000 URLs, headers only: $0.80. Hashed: $2.
  • 10,000 URLs, headers only: $8. Hashed: $20.
  • 100,000 URLs, headers only: $80. Hashed: $200.

maxUrls caps a run and maxHashFileMb caps each hashed file. If you set a maximum spend per run the Actor stops cleanly when it is reached. Apify platform usage is included in this price.

FAQ

Does it download the files?

Header mode does not: it sends a HEAD request, or a ranged GET for the first 2 KB if the server refuses HEAD or you turn on sniffType. Checksum mode downloads each file once to hash it in memory and keeps nothing.

Why is sizeBytes empty for some URLs?

Some servers do not send Content-Length (dynamic or chunked responses), send it compressed, or refuse HEAD. The Actor tries a ranged GET for Content-Range; if the server still does not say, the size is null. Turn on computeHash to measure it exactly, up to maxHashFileMb.

Can I trust contentType?

It is what the server says, and servers are often wrong (for example application/octet-stream for a PDF). mimeFromExtension shows what the file name implies and detectedType (with sniffType or checksums on) shows what the first bytes say.

Only on direct links that answer anonymously. Share pages are HTML, so you will see text/html and, with type checking, a warning. Links that need a login give a blocked row; the Actor does not log in.

How big a file can it hash?

Up to 1,000 MB with maxHashFileMb; the default is 100 MB. Each file has hashTimeoutSecs (default 300) to finish streaming. Slow hosts may time out on large files, which gives hashStatus: "failed" with the reason.

Is it safe to give internal addresses?

Links to private, loopback and cloud-metadata addresses are refused, including after redirects, and cost nothing. At most 5 redirects are followed and every hop is checked.

  • Bulk File Downloader: Download Files from URLs to ZIP to download the files that pass your size and type checks.
  • Download Images from URLs: Bulk Image & File Downloader for image lists.
  • HTTP Status Code Checker: Bulk URL, Website & Redirect Chains to check page URLs and redirect chains.