Skip to content

ANPA (.anpa)

.anpa file signature | text/vnd.iptc.anpa

ANPA is a legacy plain-text newswire file format developed by the American Newspaper Publishers Association and later used by Associated Press systems for electronic news transmission. It was used to distribute headlines, articles, and other editorial copy to newspapers and broadcast outlets, and may still appear in archival publishing workflows. The format is generally safe to process because it is text-based, though older files can contain outdated encodings or control characters that require careful parsing.

Safe

Magic Bytes

Offset 0
16 16 01

Sources: Apache Tika

Extension

.anpa

MIME Type

text/vnd.iptc.anpa

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .anpa files in Python

Python
def is_anpa(file_path: str) -> bool:
    """Check if file is a valid ANPA by magic bytes."""
    signature = bytes([0x16, 0x16, 0x01])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .anpa files in Node.js

Node.js
function isANPA(buffer: Buffer): boolean {
  const signature = Buffer.from([0x16, 0x16, 0x01]);
  return buffer.subarray(0, 3).equals(signature);
}

How to validate .anpa files in Go

Go
func IsANPA(data []byte) bool {
    signature := []byte{0x16, 0x16, 0x01}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

GET /api/v1/anpa
curl https://filesignature.org/api/v1/anpa

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .anpa file?

A .anpa file is identified by the magic bytes 16 16 01 at byte offset 0. ANPA is a legacy plain-text newswire file format developed by the American Newspaper Publishers Association and later used by Associated Press systems for electronic news transmission. It was used to distribute headlines, articles, and other editorial copy to newspapers and broadcast outlets, and may still appear in archival publishing workflows. The format is generally safe to process because it is text-based, though older files can contain outdated encodings or control characters that require careful parsing.

What are the magic bytes for .anpa files?

The magic bytes for ANPA files are 16 16 01 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .anpa file?

To validate a .anpa file, read the first bytes of the file and compare them against the known magic bytes (16 16 01) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .anpa files?

The primary MIME type for .anpa files is text/vnd.iptc.anpa.

Is it safe to open .anpa files?

ANPA (.anpa) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.