# Associated Press

> Bring Associated Press wire stories, photos, graphics, video and audio into your workflows: search and read AP content, follow your feed and saved searches, get a story's text, download files, and check your plan, downloads and feed monitors.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/associated-press

## Actions

### Create monitor

Create a feed monitor that emails up to 5 people when a feed it watches stops being read, or has many errors.

**Inputs**

- Name (`name`, text, required): The monitor's name: up to 20 letters, digits, '.', '_' or '-', with no spaces.
- Alert emails (`emails`, list, required): Up to 5 email addresses to alert.
- Alert when the feed is idle for (`idle_time`, text): Alert when the watched feed stops being read for this long. Defaults to 15 minutes. One of: `off` (Don't watch for an idle feed), `PT2M` (2 minutes), `PT5M` (5 minutes), `PT10M` (10 minutes), `PT15M` (15 minutes), `PT30M` (30 minutes), `PT1H` (1 hour), `PT2H` (2 hours), `PT4H` (4 hours), `PT8H` (8 hours), `PT12H` (12 hours). Default: `PT15M`.
- Alert on many errors (`quality_alerts`, true/false): Also alert when the feed has many errors within five minutes. Default: `false`.
- Repeat the alert (`repeat_alerts`, text): How often to send the alert again while the problem lasts. One of: `0` (Never), `PT10M` (Every 10 minutes), `PT30M` (Every 30 minutes), `PT1H` (Every hour), `PT2H` (Every 2 hours), `PT6H` (Every 6 hours), `PT12H` (Every 12 hours), `PT24H` (Every 24 hours).
- Description (`description`, text): A short note on what the monitor is for.
- Troubleshooting steps (`troubleshooting`, text): What to do when the alert comes, included in it.

**Outputs**

- `name` (text): The monitor's name
- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "name": "lodol_feed",
  "result": {
    "monitor": {
      "conditions": [
        {
          "criteria": {
            "idleTime": "PT15M"
          },
          "enabled": true,
          "type": "idleFeed"
        }
      ],
      "description": "Watch the newsdesk feed.",
      "name": "lodol_feed",
      "notify": [
        {
          "channelDestinations": [
            "newsdesk@example.com"
          ],
          "channelType": "email"
        }
      ],
      "playbook": "Check the workflow is turned on.",
      "repeatAlerts": "PT2H"
    }
  }
}
```

### Delete monitor

Delete a feed monitor so it stops checking and alerting.

**Inputs**

- Monitor (`monitor`, text, required): The monitor. Pick one, or give its name.

**Outputs**

- `deleted` (true/false): True once deleted
- `name` (text): The monitor deleted
- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "deleted": true,
  "name": "lodol_feed",
  "result": {}
}
```

### Download file

Download one of an item's files (the full-resolution photo or video, a preview, a thumbnail, or its text) and keep it as a file later steps can attach or upload. Files that cost extra download only with 'Accept the charge' on.

**Inputs**

- Item ID (`item_id`, text, required): The item's id (32 letters and digits): the item_id a search or feed step returns. An item's AP link works too.
- File (`rendition`, text): Which file. Previews and thumbnails never cost extra. Defaults to full resolution. One of: `main` (Full resolution (main)), `preview`, `thumbnail`, `story` (Story text (NITF)), `caption` (Caption (NITF)), `script` (Video script and shot list (NITF)). Default: `main`.
- Accept the charge (`accept_charge`, true/false): Download even if AP charges for this file (money or credits on your plan). Off, a priced file is not downloaded and the step says what it would cost. Default: `false`.

**Outputs**

- `content_type` (text): The file's type
- `download_url` (text): Where AP sent the file from; it expires soon
- `file` (object): The file, kept for later steps
- `file_name` (text): The file's name
- `headline` (text): Its headline
- `item_id` (text): The item
- `pricetag` (text): What AP charged: Unlimited, MeterTick:1, USD:15.00
- `rendition` (text): The file's name in AP's list, such as main

**Example output**

```json
{
  "content_type": "image/jpeg",
  "download_url": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg",
  "file": {
    "content_type": "image/jpeg",
    "document_ref": "doc_4b1c9e2a7d3f",
    "filename": "0726a2a7a06b48d0af1e41bf04fe8f80-preview.jpg",
    "size_bytes": 48211,
    "url": "/actions/core/serve-document/doc_4b1c9e2a7d3f?teamId=64b0000000000000000000aa"
  },
  "file_name": "0726a2a7a06b48d0af1e41bf04fe8f80-preview.jpg",
  "headline": "Southern Storms",
  "item_id": "0726a2a7a06b48d0af1e41bf04fe8f80",
  "pricetag": "",
  "rendition": "preview"
}
```

### Get feed

Get a page of incoming AP content, oldest first, for all of your plan or the products, media types, saved search or words chosen. Give the next page link it returns to get only what came in since. A feed with search words starts empty and fills as news arrives.

**Inputs**

- Search words (`query`, text): Words to look for, in AP's search syntax: quotes for a phrase, AND, OR and NOT in capitals, or a field such as headline:storm. Example: "climate change" AND type:text.
- Media types (`media_types`, list): Only these kinds of content. Leave empty for all of them. One or more of: `text` (Stories (text)), `picture` (Photos), `graphic` (Graphics), `video`, `audio`.
- AP products (`product_ids`, list): Only content from these products or packages of your AP plan. Leave empty for everything your plan includes.
- Saved search (`followed_topic_id`, text): Only content matching one of your AP Newsroom saved searches that has a feed.
- How many (`page_size`, number): How many items to return, 1 to 100. AP's default is 10. From 1 to 100.
- Only what my plan includes (`in_my_plan`, true/false): Leave out items (and linked photos or videos) that cost extra. Default: `false`.
- Next page link (`next_page`, text): The next_page link from an earlier run of this step. When given, the other filters are already in it and are ignored.

**Outputs**

- `count` (number): How many items on this page
- `items` (list): The items, each with its item_id
- `next_page` (text): Link to the next page: give it as 'Next page link' to get what came in since
- `query` (text): The query AP ran
- `updated` (text): When AP answered (UTC)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "altids": {
        "etag": "0726a2a7a06b48d0af1e41bf04fe8f80_0a1aza0c0",
        "friendlykey": "24113461783915",
        "itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"
      },
      "associations": {},
      "bylines": [
        {
          "by": "Jo Bloggs",
          "title": "Staff"
        }
      ],
      "copyrightnotice": "Copyright 2026 The Associated Press. All rights reserved.",
      "description_caption": "Storm clouds gather over Tupelo, Miss., on Nov. 16, 2026.",
      "description_creditline": "AP",
      "description_summary": "",
      "ednote": "",
      "embargoed": "",
      "firstcreated": "2026-11-16T21:40:11Z",
      "headline": "Southern Storms",
      "item_id": "0726a2a7a06b48d0af1e41bf04fe8f80",
      "keywords": [
        "storms",
        "weather"
      ],
      "language": "en",
      "located": "Tupelo, Miss.",
      "meta": {
        "products": [
          {
            "id": 31989,
            "name": "AP Online Top General Headlines"
          }
        ]
      },
      "person": [],
      "place": [],
      "profile": "Spot Development",
      "pubstatus": "usable",
      "renditions": {
        "caption_nitf": {
          "fileextension": "xml",
          "format": "IIM",
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?type=text&format=nitf&text=caption",
          "mimetype": "text/xml",
          "rel": "Caption",
          "title": "NITF Caption Download",
          "type": "text"
        },
        "main": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 3648,
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?role=main",
          "mimetype": "image/jpeg",
          "pricetag": "Unlimited",
          "rel": "Main",
          "title": "Full Resolution (JPG)",
          "type": "picture",
          "width": 5472
        },
        "preview": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 341,
          "href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg",
          "mimetype": "image/jpeg",
          "rel": "Preview",
          "title": "Preview (JPG)",
          "type": "picture",
          "width": 512
        }
      },
      "slugline": "Southern Storms",
      "subject": [
        {
          "code": "f25af2d07e4e100484f5df092526b43e",
          "name": "General news",
          "rels": [
            "direct"
          ]
        }
      ],
      "title": "Southern Storms",
      "type": "picture",
      "urgency": 3,
      "uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
      "usageterms": [],
      "version": 0,
      "versioncreated": "2026-11-16T21:43:02Z"
    }
  ],
  "next_page": "https://api.ap.org/media/v/content/feed?qt=sym86viZrF&seq=64292965",
  "query": "productid:31989",
  "updated": "2026-11-16T21:45:00.421Z"
}
```

### Get item

Get one AP item with its headline, caption, bylines, subjects, usage terms and the files you can download.

**Inputs**

- Item ID (`item_id`, text, required): The item's id (32 letters and digits): the item_id a search or feed step returns. An item's AP link works too.
- Include prices (`include_pricing`, true/false): Add each item's full price, use code and pricing message. Default: `false`.
- Only what my plan includes (`in_my_plan`, true/false): Leave out items (and linked photos or videos) that cost extra. Default: `false`.

**Outputs**

- `item` (object): The item

**Example output**

```json
{
  "item": {
    "altids": {
      "etag": "0726a2a7a06b48d0af1e41bf04fe8f80_0a1aza0c0",
      "friendlykey": "24113461783915",
      "itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"
    },
    "associations": {},
    "bylines": [
      {
        "by": "Jo Bloggs",
        "title": "Staff"
      }
    ],
    "copyrightnotice": "Copyright 2026 The Associated Press. All rights reserved.",
    "description_caption": "Storm clouds gather over Tupelo, Miss., on Nov. 16, 2026.",
    "description_creditline": "AP",
    "description_summary": "",
    "ednote": "",
    "embargoed": "",
    "firstcreated": "2026-11-16T21:40:11Z",
    "headline": "Southern Storms",
    "item_id": "0726a2a7a06b48d0af1e41bf04fe8f80",
    "keywords": [
      "storms",
      "weather"
    ],
    "language": "en",
    "located": "Tupelo, Miss.",
    "meta": {
      "products": [
        {
          "id": 31989,
          "name": "AP Online Top General Headlines"
        }
      ]
    },
    "person": [],
    "place": [],
    "profile": "Spot Development",
    "pubstatus": "usable",
    "renditions": {
      "caption_nitf": {
        "fileextension": "xml",
        "format": "IIM",
        "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?type=text&format=nitf&text=caption",
        "mimetype": "text/xml",
        "rel": "Caption",
        "title": "NITF Caption Download",
        "type": "text"
      },
      "main": {
        "fileextension": "jpg",
        "format": "JPEG Baseline",
        "height": 3648,
        "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?role=main",
        "mimetype": "image/jpeg",
        "pricetag": "Unlimited",
        "rel": "Main",
        "title": "Full Resolution (JPG)",
        "type": "picture",
        "width": 5472
      },
      "preview": {
        "fileextension": "jpg",
        "format": "JPEG Baseline",
        "height": 341,
        "href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg",
        "mimetype": "image/jpeg",
        "rel": "Preview",
        "title": "Preview (JPG)",
        "type": "picture",
        "width": 512
      }
    },
    "slugline": "Southern Storms",
    "subject": [
      {
        "code": "f25af2d07e4e100484f5df092526b43e",
        "name": "General news",
        "rels": [
          "direct"
        ]
      }
    ],
    "title": "Southern Storms",
    "type": "picture",
    "urgency": 3,
    "uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
    "usageterms": [],
    "version": 0,
    "versioncreated": "2026-11-16T21:43:02Z"
  }
}
```

### Get monitor

Get one feed monitor's settings.

**Inputs**

- Monitor (`monitor`, text, required): The monitor. Pick one, or give its name.

**Outputs**

- `name` (text): The monitor's name
- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "name": "lodol_feed",
  "result": {
    "monitor": {
      "conditions": [
        {
          "criteria": {
            "idleTime": "PT15M"
          },
          "enabled": true,
          "type": "idleFeed"
        }
      ],
      "description": "Watch the newsdesk feed.",
      "name": "lodol_feed",
      "notify": [
        {
          "channelDestinations": [
            "newsdesk@example.com"
          ],
          "channelType": "email"
        }
      ],
      "playbook": "Check the workflow is turned on.",
      "repeatAlerts": "PT2H"
    }
  }
}
```

### Get On-Demand items

Get items your editors sent to an On-Demand queue in AP Newsroom, in the order they were sent. Each item comes back once per reader name, then leaves the queue for that name.

**Inputs**

- Queue ID (`queue_id`, text): The On-Demand queue, from AP Newsroom's configuration dashboard. Leave empty for your default queue.
- Reader name (`consumer_name`, text): A name for what reads the queue: each name gets every item once, so a different name doesn't take items from your newsroom system. Defaults to lodol.
- How many (`page_size`, number): How many items to return, 1 to 100. AP's default is 10. From 1 to 100.

**Outputs**

- `consumer_name` (text): The reader name the items were read as
- `count` (number): How many items on this page
- `items` (list): The items, each with its item_id
- `updated` (text): When AP answered (UTC)

**Example output**

```json
{
  "consumer_name": "lodol",
  "count": 1,
  "items": [
    {
      "altids": {
        "etag": "0726a2a7a06b48d0af1e41bf04fe8f80_0a1aza0c0",
        "friendlykey": "24113461783915",
        "itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"
      },
      "associations": {},
      "bylines": [
        {
          "by": "Jo Bloggs",
          "title": "Staff"
        }
      ],
      "copyrightnotice": "Copyright 2026 The Associated Press. All rights reserved.",
      "description_caption": "Storm clouds gather over Tupelo, Miss., on Nov. 16, 2026.",
      "description_creditline": "AP",
      "description_summary": "",
      "ednote": "",
      "embargoed": "",
      "firstcreated": "2026-11-16T21:40:11Z",
      "headline": "Southern Storms",
      "item_id": "0726a2a7a06b48d0af1e41bf04fe8f80",
      "keywords": [
        "storms",
        "weather"
      ],
      "language": "en",
      "located": "Tupelo, Miss.",
      "meta": {
        "products": [
          {
            "id": 31989,
            "name": "AP Online Top General Headlines"
          }
        ]
      },
      "person": [],
      "place": [],
      "profile": "Spot Development",
      "pubstatus": "usable",
      "renditions": {
        "caption_nitf": {
          "fileextension": "xml",
          "format": "IIM",
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?type=text&format=nitf&text=caption",
          "mimetype": "text/xml",
          "rel": "Caption",
          "title": "NITF Caption Download",
          "type": "text"
        },
        "main": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 3648,
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?role=main",
          "mimetype": "image/jpeg",
          "pricetag": "Unlimited",
          "rel": "Main",
          "title": "Full Resolution (JPG)",
          "type": "picture",
          "width": 5472
        },
        "preview": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 341,
          "href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg",
          "mimetype": "image/jpeg",
          "rel": "Preview",
          "title": "Preview (JPG)",
          "type": "picture",
          "width": 512
        }
      },
      "slugline": "Southern Storms",
      "subject": [
        {
          "code": "f25af2d07e4e100484f5df092526b43e",
          "name": "General news",
          "rels": [
            "direct"
          ]
        }
      ],
      "title": "Southern Storms",
      "type": "picture",
      "urgency": 3,
      "uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
      "usageterms": [],
      "version": 0,
      "versioncreated": "2026-11-16T21:43:02Z"
    }
  ],
  "updated": "2026-11-16T21:45:00.421Z"
}
```

### Get request limits

Get how many requests your AP key may make a minute or a day, for each kind of request.

**Inputs**: None.

**Outputs**

- `account` (text): The account they apply to
- `count` (number): How many limits
- `quotas` (list): The limits
- `updated` (text): When AP answered (UTC)

**Example output**

```json
{
  "account": "",
  "count": 3,
  "quotas": [
    {
      "limit": 10,
      "method": "search",
      "period": "PT1M",
      "unlimited": false
    },
    {
      "limit": 20,
      "method": "feed",
      "period": "PT1M",
      "unlimited": false
    },
    {
      "limit": 0,
      "method": "other",
      "period": "",
      "unlimited": true
    }
  ],
  "updated": "2026-11-16T15:13:42.927Z"
}
```

### Get story text

Get the full text of an AP story as plain paragraphs (for a photo, graphic or video, its caption). AP counts this as a download.

**Inputs**

- Item ID (`item_id`, text, required): The item's id (32 letters and digits): the item_id a search or feed step returns. An item's AP link works too.

**Outputs**

- `headline` (text): Its headline
- `item_id` (text): The item
- `paragraphs` (list): The paragraphs
- `rendition` (text): Which of its files the text came from
- `text` (text): The text, paragraphs separated by blank lines
- `type` (text): text, picture, graphic, audio or video
- `word_count` (number): How many words

**Example output**

```json
{
  "headline": "Damaging hail and tornadoes threatened for southeast US",
  "item_id": "c116ac3656f240238ee7529720e4a4b8",
  "paragraphs": [
    "ATLANTA (AP) Severe storms are expected across the Southeast.",
    "Forecasters warned of large hail."
  ],
  "rendition": "nitf",
  "text": "ATLANTA (AP) Severe storms are expected across the Southeast.\n\nForecasters warned of large hail.",
  "type": "text",
  "word_count": 15
}
```

### List downloads

List what you or your AP salesperson downloaded, with who, when and the charge. Covers up to 60 days at a time within the last year; the last 30 days unless dates are given.

**Inputs**

- From (`min_date`, date): Downloads on or after this date. Defaults to 30 days ago.
- To (`max_date`, date): Downloads on or before this date. Defaults to today.
- Order number (`order_id`, text): Only this order, its id from an earlier list. Its date must be in the range.

**Outputs**

- `count` (number): How many on this page
- `downloads` (list): The downloads
- `max_date` (text): The range's end
- `min_date` (text): The range's start
- `total_items` (number): How many in the range

**Example output**

```json
{
  "count": 1,
  "downloads": [
    {
      "charge": 10.0,
      "currency": "USD",
      "download_date": "2026-11-10T22:01:54Z",
      "downloaded_by": "First Last",
      "duplicate": false,
      "id": 32800283,
      "item": {
        "friendlykey": "17003157050469",
        "id": "https://api.ap.org/media/v/content/a342d7bd56394600b7594d5f395eb387",
        "source": "Invision",
        "title": "Palm Springs International Film Festival",
        "type": "Picture"
      }
    }
  ],
  "max_date": "2026-11-16",
  "min_date": "2026-10-17",
  "total_items": 1
}
```

### List monitor alerts

List the alerts your feed monitors sent recently, newest first.

**Inputs**

- Full details (`show_detail`, true/false): Include each monitor's settings and latest alert in full. Default: `false`.

**Outputs**

- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "result": {
    "alerts": [
      {
        "condition": "idleFeed",
        "last_alerted": "2026-11-16T03:15:00Z",
        "monitor": "lodol_feed",
        "status": "alarm"
      }
    ]
  }
}
```

### List monitors

List your feed monitors: the checks that email you when a feed stops being read or has many errors.

**Inputs**: None.

**Outputs**

- `monitors` (list): The monitors found in it
- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "monitors": [
    {
      "conditions": [
        {
          "criteria": {
            "idleTime": "PT15M"
          },
          "enabled": true,
          "type": "idleFeed"
        }
      ],
      "description": "Watch the newsdesk feed.",
      "name": "lodol_feed",
      "notify": [
        {
          "channelDestinations": [
            "newsdesk@example.com"
          ],
          "channelType": "email"
        }
      ],
      "playbook": "Check the workflow is turned on.",
      "repeatAlerts": "PT2H"
    }
  ],
  "result": {
    "monitors": [
      {
        "conditions": [
          {
            "criteria": {
              "idleTime": "PT15M"
            },
            "enabled": true,
            "type": "idleFeed"
          }
        ],
        "description": "Watch the newsdesk feed.",
        "name": "lodol_feed",
        "notify": [
          {
            "channelDestinations": [
              "newsdesk@example.com"
            ],
            "channelType": "email"
          }
        ],
        "playbook": "Check the workflow is turned on.",
        "repeatAlerts": "PT2H"
      }
    ]
  }
}
```

### List plans

List your AP plans with how much of each you've used this billing cycle and the products and packages each includes.

**Inputs**: None.

**Outputs**

- `count` (number): How many plans
- `plans` (list): The plans
- `updated` (text): When AP answered (UTC)

**Example output**

```json
{
  "count": 1,
  "plans": [
    {
      "entitlements": [
        {
          "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:31989",
          "id": 31989,
          "media_type": "Text",
          "name": "AP Online Top General Headlines",
          "overage_allowed": false,
          "search_link": "https://api.ap.org/media/v/content/search?q=productid:31989",
          "sub_type": "Full",
          "type": "Product"
        }
      ],
      "id": 123,
      "interval": "P1M",
      "name": "Metered Plan",
      "next_cycle_begins": "2026-12-01",
      "plan_style": "downloads",
      "updated": "2026-11-02T17:28:14.051Z",
      "usage_limit": 100,
      "used": 12
    }
  ],
  "updated": "2026-11-16T16:19:29.616Z"
}
```

### List saved searches

List your AP Newsroom saved searches that have a feed, with the id the feed steps and triggers use.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `followed_topics` (list): The saved searches
- `updated` (text): When AP answered (UTC)

**Example output**

```json
{
  "count": 2,
  "followed_topics": [
    {
      "id": "714005",
      "name": "Italy Earthquake"
    },
    {
      "id": "714006",
      "name": "Soccer"
    }
  ],
  "updated": "2026-11-16T14:01:27.728Z"
}
```

### Search content

Search AP stories, photos, graphics, video and audio your plan includes: the last 30 days of news and AP's photo, video and graphics archive. Gets one page; run it again with the next page number for more.

**Inputs**

- Search words (`query`, text): Words to look for, in AP's search syntax: quotes for a phrase, AND, OR and NOT in capitals, or a field such as headline:storm. Example: "climate change" AND type:text.
- Media types (`media_types`, list): Only these kinds of content. Leave empty for all of them. One or more of: `text` (Stories (text)), `picture` (Photos), `graphic` (Graphics), `video`, `audio`.
- Subjects (`subjects`, list): Only content about any of these subjects. One or more of: `c8e409f8858510048872ff2260dd383e` (Business), `8783d248894710048286ba0a2b2ca13e` (Climate and environment), `1af99ec3cb954ff4b349b32d60d0376d` (Education), `16cb0ba3e6d24d97ace39f5a1924669a` (Entertainment), `f25af2d07e4e100484f5df092526b43e` (General news), `a4677d70863b4012b846a1b00f5079f5` (U.S. news), `bb2d2c5f441a452cb24bb511a2ab5eea` (World news), `abfca78268874726966cdad8c35c4ae3` (Washington news), `cc7a76087e4e10048482df092526b43e` (Health), `3e37e4b87df7100483d5df092526b43e` (Lifestyle), and 9 more.
- AP products (`product_ids`, list): Only content from these products or packages of your AP plan. Leave empty for everything your plan includes.
- Published on or after (`from_date`, date): Only content published on or after this date.
- Published on or before (`to_date`, date): Only content published on or before this date.
- Order (`sort`, text): Best match first, or by when it was published. One of: `_score:desc` (Best match (default)), `versioncreated:desc` (Newest first), `versioncreated:asc` (Oldest first). Default: `_score:desc`.
- How many (`page_size`, number): How many items to return, 1 to 100. AP's default is 10. From 1 to 100.
- Page (`page`, number): Which page of results, starting at 1. At least 1.
- Only what my plan includes (`in_my_plan`, true/false): Leave out items (and linked photos or videos) that cost extra. Default: `false`.
- Include prices (`include_pricing`, true/false): Add each item's full price, use code and pricing message. Default: `false`.

**Outputs**

- `count` (number): How many items on this page
- `feed_href` (text): On the last page, a feed link for new matches
- `items` (list): The items, each with its item_id
- `next_page` (text): Link to the next page, empty on the last
- `page` (number): This page's number
- `query` (text): The query AP ran
- `total_items` (number): How many items match in all

**Example output**

```json
{
  "count": 1,
  "feed_href": "",
  "items": [
    {
      "altids": {
        "etag": "0726a2a7a06b48d0af1e41bf04fe8f80_0a1aza0c0",
        "friendlykey": "24113461783915",
        "itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"
      },
      "associations": {},
      "bylines": [
        {
          "by": "Jo Bloggs",
          "title": "Staff"
        }
      ],
      "copyrightnotice": "Copyright 2026 The Associated Press. All rights reserved.",
      "description_caption": "Storm clouds gather over Tupelo, Miss., on Nov. 16, 2026.",
      "description_creditline": "AP",
      "description_summary": "",
      "ednote": "",
      "embargoed": "",
      "firstcreated": "2026-11-16T21:40:11Z",
      "headline": "Southern Storms",
      "item_id": "0726a2a7a06b48d0af1e41bf04fe8f80",
      "keywords": [
        "storms",
        "weather"
      ],
      "language": "en",
      "located": "Tupelo, Miss.",
      "meta": {
        "products": [
          {
            "id": 31989,
            "name": "AP Online Top General Headlines"
          }
        ],
        "score": 8.23
      },
      "person": [],
      "place": [],
      "profile": "Spot Development",
      "pubstatus": "usable",
      "renditions": {
        "caption_nitf": {
          "fileextension": "xml",
          "format": "IIM",
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?type=text&format=nitf&text=caption",
          "mimetype": "text/xml",
          "rel": "Caption",
          "title": "NITF Caption Download",
          "type": "text"
        },
        "main": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 3648,
          "href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?role=main",
          "mimetype": "image/jpeg",
          "pricetag": "Unlimited",
          "rel": "Main",
          "title": "Full Resolution (JPG)",
          "type": "picture",
          "width": 5472
        },
        "preview": {
          "fileextension": "jpg",
          "format": "JPEG Baseline",
          "height": 341,
          "href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg",
          "mimetype": "image/jpeg",
          "rel": "Preview",
          "title": "Preview (JPG)",
          "type": "picture",
          "width": 512
        }
      },
      "slugline": "Southern Storms",
      "subject": [
        {
          "code": "f25af2d07e4e100484f5df092526b43e",
          "name": "General news",
          "rels": [
            "direct"
          ]
        }
      ],
      "title": "Southern Storms",
      "type": "picture",
      "urgency": 3,
      "uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
      "usageterms": [],
      "version": 0,
      "versioncreated": "2026-11-16T21:43:02Z"
    }
  ],
  "next_page": "",
  "page": 1,
  "query": "type:picture AND subject:f25af2d07e4e100484f5df092526b43e",
  "total_items": 1
}
```

### Update monitor

Replace a feed monitor's settings with the ones given: who it alerts and what it watches for.

**Inputs**

- Monitor (`monitor`, text, required): The monitor. Pick one, or give its name.
- Alert emails (`emails`, list, required): Up to 5 email addresses to alert.
- Alert when the feed is idle for (`idle_time`, text): Alert when the watched feed stops being read for this long. Defaults to 15 minutes. One of: `off` (Don't watch for an idle feed), `PT2M` (2 minutes), `PT5M` (5 minutes), `PT10M` (10 minutes), `PT15M` (15 minutes), `PT30M` (30 minutes), `PT1H` (1 hour), `PT2H` (2 hours), `PT4H` (4 hours), `PT8H` (8 hours), `PT12H` (12 hours). Default: `PT15M`.
- Alert on many errors (`quality_alerts`, true/false): Also alert when the feed has many errors within five minutes. Default: `false`.
- Repeat the alert (`repeat_alerts`, text): How often to send the alert again while the problem lasts. One of: `0` (Never), `PT10M` (Every 10 minutes), `PT30M` (Every 30 minutes), `PT1H` (Every hour), `PT2H` (Every 2 hours), `PT6H` (Every 6 hours), `PT12H` (Every 12 hours), `PT24H` (Every 24 hours).
- Description (`description`, text): A short note on what the monitor is for.
- Troubleshooting steps (`troubleshooting`, text): What to do when the alert comes, included in it.

**Outputs**

- `name` (text): The monitor's name
- `result` (object): AP's answer, as AP gave it

**Example output**

```json
{
  "name": "lodol_feed",
  "result": {
    "monitor": {
      "conditions": [
        {
          "criteria": {
            "idleTime": "PT15M"
          },
          "enabled": true,
          "type": "idleFeed"
        }
      ],
      "description": "Watch the newsdesk feed.",
      "name": "lodol_feed",
      "notify": [
        {
          "channelDestinations": [
            "newsdesk@example.com"
          ],
          "channelType": "email"
        }
      ],
      "playbook": "Check the workflow is turned on.",
      "repeatAlerts": "PT2H"
    }
  }
}
```
