Fork of Meta's ThreatExchange, primarily for HMA work
  • C++ 54%
  • Python 29.2%
  • Java 6.7%
  • JavaScript 1.8%
  • Ruby 1.6%
  • Other 6.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-03 15:41:56 -04:00
.devcontainer [vpdq] Add Dockerfile (#1599) 2024-07-01 16:41:21 -04:00
.github [hma] Generate OpenAPI spec during website CI (#1982) 2026-05-20 08:23:17 -04:00
api-reference-examples [docs] Trim formatting (#1764) 2025-02-18 11:05:09 -05:00
hasher-matcher-actioner [hma] Require pytx 1.2.16 (#1988) 2026-06-03 15:41:06 -04:00
hashing Remove confusing duplicate LICENSE files for #868 (#884) 2021-12-09 16:55:50 -05:00
open-media-match [omm] Update README.md to point to HMA (#1558) 2024-03-01 11:24:13 -05:00
pdq [vpdq] [pdq] Misc cleanup (#1924) 2026-02-03 09:42:09 -08:00
python-threatexchange [pytx] Fix mypy type-check errors in pytx CI (#1987) 2026-06-03 15:41:56 -04:00
tmk [vpdq] [pdq] Misc cleanup (#1924) 2026-02-03 09:42:09 -08:00
vpdq [vpdq] [pdq] Misc cleanup (#1924) 2026-02-03 09:42:09 -08:00
website [hma] Generate OpenAPI spec during website CI (#1982) 2026-05-20 08:23:17 -04:00
.gitignore [pytx] Ignore claude configs (#1920) 2026-02-02 09:06:35 -05:00
.pre-commit-config.yaml Change init() to access_token() and add proxies/verify support. 2015-10-29 15:24:15 -04:00
CODE_OF_CONDUCT.md OSS Automated Fix: Addition of Code of Conduct 2019-03-27 15:29:13 -07:00
CONTRIBUTING.md Add AI policy to root level Contributing.md (#1947) 2026-03-12 11:15:38 -04:00
Dockerfile.vpdq Add required copyright headers to files missing it (#1625) 2024-09-24 13:08:38 -04:00
LICENSE Update files copyright headers and minor cleanup (#1250) 2023-01-18 13:10:22 -05:00
README.md [CI] Fix labelling actions (#1775) 2025-03-04 07:38:28 -08:00
ThreatExchange.iml Update README for bazelized build 2019-08-01 16:09:39 -07:00

Projects in this Repository

This repository originally started as code to support Meta's ThreatExchange API, but over time has grown to include a number of projects to support signal exchange and content moderation in general. Below are a list of sub-projects.

PDQ Image Hashing and Similarity Matching

PDQ is a photo hashing algorithm that can turn photos into 256 bit signatures which can then be used to match other photos.

TMK+PDQF (TMK) Video Hashing and Similarity Matching

TMK+PDQF (or TMK for short) is a video hashing algorithm that can turn videos into 256KB signatures which can be used to match other videos.

Video PDQ (vPDQ) Video Hashing and Similarity Matching

Video PDQ (or vPDQ for short) is a simple video hashing algorithm that determines two videos are matching based on the amount of shared similar frames. It can easily be applied for other image algorithms, and not just PDQ.

Hasher-Matcher-Actioner (HMA) Trust & Safety Platform

HMA is a ready-to-deploy content moderation project for AWS, containing many submodules. It allows you to maintain lists of known content to scan for, which you can either curate yourself or connect to other hash exchange programs to share and receive lists. More can be found at the wiki.

A second version of this project, called "Open Media Match" is under construction, which uses a cloud-agnostic docker-based deployment.

python-threatexchange

A python Library/CLI tool available on pypi under threatexchange which provides implementations for content scanning and signal exchange. It provides reference implementations in python for downloading hashes from Meta's ThreatExchange API, scanning images with PDQ, and others. It can also be easily extended to work with other hash exchanges and other techniques, not all of which are written by the maintainers of this repository.

Meta's ThreatExchange API Reference Examples

The api-reference-examples folder contains example implementations in various languages for using the API. These implementations are at various stages of completeness and may not all implement every endpoint available on the ThreatExchange API. For full details on the ThreatExchange API and UI, data formats, and best practices are available in the ThreatExchange docs.

Meta's ThreatExchange API

ThreatExchange is a set of RESTful APIs on the Facebook Platform for querying, publishing, and sharing security threat information. It's a lightweight way for exchanging details on malware, phishing pages, and other threats with either specific members of the community or the ThreatExchange community at large.

For full details on ThreatExchange and best practices are available in the ThreatExchange docs.

Get All Available Data

For tag-driven workloads, supporting either bulk download or incremental updates, our currently recommended best practice is a Java reference design.

You can also explore the dataset using the hosted ThreatExchange UI

Getting Access

To request access to ThreatExchange, please submit an application via https://developers.facebook.com/products/threat-exchange/.

Other Information about this Repository

Contributing

We welcome contributions! See CONTRIBUTING for details on how to get started, and our Code of Conduct.

License

All projects in this repository are under the BSD license - see ./LICENSE. However, there are some exceptions for files that were included for demonstration purposes, and their alternative licenses are noted at the top of the files themselves.

As of 12/9/2021, this is the complete list of exceptions:

  • pdq/cpp/CImg.h