AP News APIapnews.com ↗
Search AP News articles by keyword and retrieve full article content including body text, authors, keywords, and publication dates via a simple REST API.
What is the AP News API?
The AP News API provides 2 endpoints to search and retrieve articles from the Associated Press. Use search_articles to query any topic and get up to 30 results per page, each with title, URL, description, and publication dates. Use get_article to pull the full body text, author list, keyword tags, and main image URL for any article URL returned from search.
curl -X GET 'https://api.parse.bot/scraper/e48f05fb-a9f6-45f7-86c2-3bf992407e00/search_articles?page=1&query=brazil' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace apnews-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: AP News SDK — search articles and drill into full detail."""
from parse_apis.apnews_com_api import APNews, ArticleNotFound
client = APNews()
# Search for recent articles about climate change, cap total items at 5.
for summary in client.article_summaries.search(query="climate change", limit=5):
print(summary.title, "|", summary.published_date.date())
# Drill down: take the first result and fetch its full article detail.
hit = client.article_summaries.search(query="brazil", limit=1).first()
if hit is not None:
article = hit.details()
print(article.title)
print("Authors:", ", ".join(article.authors))
print("Keywords:", ", ".join(article.keywords[:5]))
print(article.body[:200])
# Point lookup by a known URL (e.g. discovered from a previous search).
if hit is not None:
try:
full = client.articles.get(url=hit.url)
print(full.title, "|", full.published_date)
except ArticleNotFound:
print("Article no longer available")
print("exercised: article_summaries.search / details / articles.get")
Search AP News articles by keyword query. Returns up to 30 results per page with title, URL, description, and publication dates. Paginate with the page parameter; has_next_page indicates whether more results are available.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (1-based). |
| queryrequired | string | Search query text (e.g. 'brazil', 'climate change'). |
{
"type": "object",
"fields": {
"page": "current page number",
"articles": "array of article objects with title, url, description, published_date, updated_date",
"has_next_page": "boolean indicating if more pages of results exist"
},
"sample": {
"data": {
"page": 1,
"articles": [
{
"url": "https://apnews.com/article/trump-brazil-lula-ambassador-diplomats-4d7f64110fff5dda2ffd374d5e52c682",
"title": "Trump administration revokes visa of Brazil’s ambassador to US in spat with Lula",
"description": "The Trump administration has revoked the visa of Brazil’s ambassador to the United States in retaliation for Brazil’s denial of visas last month for two American diplomats who sought to visit ahead of October elections.",
"updated_date": "2026-08-05T00:29:33Z",
"published_date": "2026-08-04T20:27:51Z"
}
],
"has_next_page": true
},
"status": "success"
}
}About the AP News API
What the API Returns
The search_articles endpoint accepts a required query string (e.g. 'brazil', 'climate change') and an optional page integer for pagination. Each response includes a page field, a has_next_page boolean to drive iteration, and an articles array. Each article object in that array carries title, url, description, published_date, and updated_date. Results are capped at 30 per page.
Full Article Detail
Passing any article_url from search_articles results into get_article returns the complete record for that piece: title, body (paragraphs separated by double newlines), authors (array of name strings), keywords (topic tags assigned by AP editors), image_url, description, published_date, and updated_date — both as ISO 8601 timestamps. This makes it straightforward to reconstruct the full article for display, indexing, or analysis without any additional requests.
Coverage and Freshness
AP News covers global news with particular depth in politics, business, science, sports, and international affairs. The query parameter on search_articles maps to AP's own search index, so results reflect the same corpus available on apnews.com. The updated_date field on both endpoints lets you detect edits after initial publication, which is relevant for wire stories that are frequently revised.
The AP News API is a managed, monitored endpoint for apnews.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when apnews.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official apnews.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor breaking news on a specific topic by polling
search_articleswith a keyword and checkingpublished_datefor new results - Build a news digest by combining
descriptionfields from multiple search queries into a single feed - Index full AP article text using
get_article'sbodyfield for downstream NLP or topic modeling pipelines - Track editorial keyword tagging patterns using the
keywordsarray returned byget_article - Detect article corrections and updates by comparing
published_dateagainstupdated_dateacross repeated fetches - Aggregate author-level coverage by extracting the
authorsarray across multipleget_articlecalls - Feed a media monitoring dashboard with real-time AP stories filtered by region or subject using
queryterms
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Associated Press offer an official developer API?+
What does `has_next_page` tell me, and how do I paginate through all results?+
has_next_page is a boolean returned in every search_articles response. When it is true, increment the page parameter and repeat the request. When it is false, you have reached the last page of results for that query. Each page returns up to 30 article objects.Does `get_article` return structured data like pull quotes, tables, or embedded media beyond the main image?+
body as plain text with paragraphs separated by double newlines, one image_url for the main article image, and the metadata fields listed above. Embedded tables, pull quotes, and inline media are not broken out as separate structured fields. You can fork this API on Parse and revise it to add extraction for those embedded elements.Can I filter `search_articles` results by date range, author, or category?+
query (keyword text) and page. There is no built-in filter for date range, author name, or AP content category. You can fork this API on Parse and revise it to add those filtering parameters.How fresh are the search results — does the API reflect articles published in the last hour?+
published_date and updated_date fields let you filter by recency on the client side once results are returned.