> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quivr.thevibecompany.co/llms.txt
> Use this file to discover all available pages before exploring further.

# NewsML-G2

> Read the text and metadata in IPTC NewsML-G2 news items and messages.

Formats

stable

v0.2.0

Needs NewsML-G2 XML

[View plugin source](https://github.com/The-Vibe-Company/quivr/tree/main/plugins/newsml-g2) · Plugin ID `newsml-g2` · Plugin API `>=0.25.0 <0.26.0`

NewsML-G2 reads the XML before Quivr indexes the story.

![NewsML-G2 reads XML news items and messages so you can search their headlines and text.](https://mintcdn.com/thevibecompany/PI_GEAEWJFtcLBcC/images/diagrams/newsml-g2.png?fit=max\&auto=format\&n=PI_GEAEWJFtcLBcC\&q=85\&s=fd26b3262531d7e1a254a8ce10a115e9)

## What it does

A format plugin turns a file into searchable parts. NewsML-G2 reads IPTC news XML, keeping article text, photo captions and metadata together with the source file.

## Before you start

Check the XML root. Use `application/vnd.iptc.g2.newsitem+xml` for a `newsItem` and `application/vnd.iptc.g2.newsmessage+xml` for a `newsMessage` that wraps news items.

## Enable it

Single Machine and Railway include both routes. For a local checkout, select `QUIVR_NORMALIZER=newsml-g2` when you start the standard `make dev` stack. For an external plugin process, [pin the plugin](https://docs.quivr.thevibecompany.co/operate/manage-plugins.md#pin-a-plugin) and add required routes for both media types.

## Use it

### Find a story from an XML export

1. Follow [Upload a file](https://docs.quivr.thevibecompany.co/guides/add-content.md#upload-a-file) with one XML file. Use the matching media type in both the upload and the document submission.
2. When the receipt for your submission reports `availability.searchable: true`, use [keyword search](https://docs.quivr.thevibecompany.co/guides/search.md#choose-a-mode) (`mode: lexical`) to look for words from a headline, slugline, supported paragraph or caption. For the [sample news message](https://github.com/The-Vibe-Company/quivr/blob/main/plugins/newsml-g2/fixtures/message.xml), search for “ferry departs at noon”.
3. Once a single file works, use the same media type in the connector’s settings to [import an archive](https://docs.quivr.thevibecompany.co/guides/connect-a-source.md#import-archives) of files of that type.

## Settings

The plugin defaults to 1 MiB of XML input and 256 KiB of extracted text. Leave `header_paths` unset unless you need specific XML headers as structured metadata.

## What it produces

Quivr can search headlines, sluglines and supported paragraph text, including text in XHTML or NITF. A message with multiple news items keeps their order. Picture items can also supply caption text and image reference metadata. Submit the image bytes separately if you want to search the pixels. The original XML stays attached.

## Limits and troubleshooting

* Malformed XML or a document with a DTD or entity declaration is refused. Check the XML source and the declared media type.
* XML over the input cap and extracted text over the text cap are refused. Submit smaller documents.
* If the file publishes with `no_text_parts`, inspect the original XML for a headline, slugline, caption or supported paragraph. Quivr can keep the source even when there is no searchable text.

## Related plugins

[Object storage archive](https://docs.quivr.thevibecompany.co/plugins/object-storage-archive.md) reads the files in an archive. [Image metadata](https://docs.quivr.thevibecompany.co/plugins/image-metadata.md) reads metadata from the image files themselves.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.