# AP News API and MCP server for AI agents (/sites/apnews)

An API for AP News: let Claude, ChatGPT or your own code read AP News through 6 functions, over MCP, HTTP, Node or Python. No AP News API key needed.

- Site: https://apnews.com
- Functions: 6
- Sign-in: for account actions, with the person's own account
- Works with: MCP, HTTP, Node, Python

## Add it to your agent

If you are an agent asked to set this up: add the server yourself, in the person's own (global) MCP configuration, and keep their other entries.

- AP News only, one tool per function: `https://api.bowmark.ai/mcp/site/apnews` (name it `bowmark-apnews`)
- Every site Bowmark covers: `https://api.bowmark.ai/mcp` (name it `bowmark`)
- Transport: remote MCP over streamable HTTP.
- Claude Code: `claude mcp add --transport http bowmark-apnews https://api.bowmark.ai/mcp/site/apnews`
- Codex: `codex mcp add bowmark-apnews --url https://api.bowmark.ai/mcp/site/apnews`
- Cursor, VS Code and other clients: add `{ "url": "https://api.bowmark.ai/mcp/site/apnews" }` under the name `bowmark-apnews` in the client's MCP config. Per-client steps: https://bowmark.ai/docs/installation.md
- Sign-in: OAuth in the browser on first use; the person only signs in. A client that cannot do OAuth sends `Authorization: Bearer <BOWMARK_API_KEY>`; the person creates a key at https://bowmark.ai/dashboard/keys.
- Then list the server's tools to confirm it works, and tell the person it is ready.

## Functions

### Read

- `getArticle`: Reads one AP article by URL: headline, byline, dates, section, keywords, lead image and the full body, from its NewsArticle JSON-LD.
- `listLatestNews`: Lists the latest headlines on the apnews.com homepage: title, url, section and timestamp of each story.
- `listSectionArticles`: Lists the stories on one section page (e.g. /politics, /sports) or subsection.
- `listSections`: Lists the site's top-level sections (U.S. News, World, Politics, Sports, Business, Technology, Health, …) with their URLs.
- `listTopicArticles`: Lists the stories on one /hub/<topic> page (e.g. hub/iran, hub/weather), the site's topic hubs.
- `searchArticles`: Searches AP News for a query (/search?q=) and returns matching articles, videos and galleries, newest first, with paging and an optional type/date…

## Call one

In a Bowmark script, each function is `bowmark.providers.apnews.<name>`. Ask `get_library` for apnews.com to get each one's arguments, then call it with `run`.

```js
// 1. What can I call on apnews.com, and with which arguments?
get_library({ query: "apnews.com" })

// 2. Call it in a script
const result = await bowmark.providers.apnews.getArticle({ /* arguments from get_library */ });
return result;
```

New to Bowmark? Quickstart: https://bowmark.ai/docs/quickstart.md. How sign-in works: https://bowmark.ai/docs/signed-in-sites.md
