AFP APIafp.com ↗
Access AFP wire news ticker, AFP Factuel fact-check articles, keyword search, region and topic filters, and trending topics via 9 structured endpoints.
What is the AFP API?
The AFP API covers 9 endpoints spanning the real-time AFP wire news ticker and AFP Factuel's full fact-checking catalog. get_homepage_news_ticker returns live dateline, timestamp, and headline fields for breaking dispatches across multiple language locales, while get_factcheck_article delivers structured body blocks, author credits, tags, and publication dates for individual fact-check pieces identified by document ID.
curl -X GET 'https://api.parse.bot/scraper/8f825f5d-d8ad-491e-9e99-729f3f4da791/get_homepage_news_ticker?lang=fr' \ -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 afp-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.
"""AFP News & Fact-Check: live wire ticker, search, and drill-down."""
from parse_apis.afp_news_and_fact_check_api import AFP, Region, Topic, Language, ArticleNotFound
client = AFP()
# Get the live news ticker in English — real-time wire dispatches.
ticker = client.newstickers.get(lang=Language.EN)
print(f"Ticker ({ticker.language}): {len(ticker.ticker_items)} items")
for item in ticker.ticker_items[:3]:
print(f" [{item.location}] {item.headline} @ {item.timestamp}")
# Search fact-check articles by keyword, capped at 5 results.
for summary in client.articlesummaries.search(query="climat", limit=5):
print(f" Found: {summary.title} (doc_id={summary.doc_id})")
# Drill into the first result's full article via the summary→detail nav op.
first = client.articlesummaries.list_by_region(region=Region.EUROPE, limit=1).first()
if first:
try:
article = first.details()
print(f"Detail: {article.title}, by {article.authors}, date={article.date}")
for block in article.body[:2]:
if block.type == "text":
print(f" [{block.tag}] {block.content[:80]}...")
except ArticleNotFound as exc:
print(f"Article gone: {exc.doc_id}")
# Browse by topic (Health) — paginated automatically.
for summary in client.articlesummaries.list_by_topic(topic_id=Topic.SANTE, limit=3):
print(f" Health: {summary.title}")
print("exercised: newstickers.get / articlesummaries.search / list_by_region / .details() / list_by_topic")
Scrape the live news ticker on afp.com homepage showing real-time AFP wire dispatches. Each item includes a dateline location, timestamp, and headline text. Ticker updates continuously with global breaking news. Language determines the AFP homepage locale.
| Param | Type | Description |
|---|---|---|
| lang | string | Language code for the AFP homepage locale. |
{
"type": "object",
"fields": {
"language": "string indicating the language used",
"ticker_items": "array of news ticker items with location, timestamp, and headline"
},
"sample": {
"data": {
"language": "en",
"ticker_items": [
{
"headline": "Saudi Arabia calls for more Mideast war talks under Pakistan, Qatar mediation",
"location": "Riyadh (AFP)",
"timestamp": "11/06/2026 - 12:02:00"
},
{
"headline": "Kremlin calls on US, Iran to 'return to negotiating table'",
"location": "Moscow (AFP)",
"timestamp": "11/06/2026 - 11:48:56"
}
]
},
"status": "success"
}
}About the AFP API
News Ticker and Fact-Check Coverage
The get_homepage_news_ticker endpoint accepts an optional lang parameter and returns a ticker_items array where each item carries a dateline location, timestamp, and headline string. This gives a continuous stream of global AFP wire dispatches as they appear on the AFP homepage. For fact-checking content, get_factcheck_homepage returns the current landing-page article list with title, url, doc_id, date, and tags for each item — no parameters required.
Retrieving and Searching Fact-Check Articles
get_factcheck_article takes a required doc_id (e.g. B2GA29E) and returns the full article structure: a body array of typed content blocks (text or image), authors, date, tags, and title. Document IDs are available from search_factcheck_articles, get_factcheck_homepage, get_factcheck_article_list_all, get_factcheck_by_region, and get_factcheck_by_topic. The search endpoint accepts a query string in French and echoes it back alongside matching results ordered by relevance.
Filtering and Browsing
get_factcheck_by_region and get_factcheck_by_topic both support zero-based page pagination and return the same article object shape. Region filtering takes a plain region name string; topic filtering takes a numeric topic_id. To discover valid topic IDs and region names, get_factcheck_trending_topics returns the currently featured tag set with name and url fields that indicate both topic-based and region-based categories.
Content Categories
get_afp_content_categories retrieves AFP's main content product categories from the corporate site — photo, video, text, graphics, fact-check, sport, and similar offerings — each with a name and url. This is useful for mapping AFP's service taxonomy before building deeper integrations against specific content verticals.
The AFP API is a managed, monitored endpoint for afp.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when afp.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 afp.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?+
- Display a live AFP breaking-news ticker widget, populated from
ticker_itemsheadline and dateline fields, localized by language code. - Build a fact-check monitoring dashboard that polls
get_factcheck_homepageand surfaces newly added articles bydoc_idanddate. - Run keyword searches against AFP Factuel using
search_factcheck_articlesto track how a topic like 'vaccin' or 'climat' is covered over time. - Index AFP Factuel article full text and tags by iterating
get_factcheck_article_list_allpages and fetching each article viaget_factcheck_article. - Filter AFP Factuel content by geography using
get_factcheck_by_regionto build region-specific misinformation tracking feeds. - Map trending fact-check topics from
get_factcheck_trending_topicsto auto-populate filter menus in a newsroom research tool. - Catalogue AFP content service offerings by name and URL using
get_afp_content_categoriesto build a product directory for media partnerships.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does AFP have an official developer API?+
What does `get_factcheck_article` return beyond the article headline?+
get_factcheck_article returns a body array of typed content blocks, where each block has a type field of either text or image and a corresponding content or url value. It also returns authors as a string, date, tags as an array, title, and the doc_id itself. You need a valid doc_id as input, which any of the listing or search endpoints can supply.Is the AFP Factuel search endpoint multilingual?+
search_factcheck_articles endpoint is scoped to AFP Factuel, which publishes primarily in French. Query terms should be in French for best results. The get_homepage_news_ticker endpoint does support a lang parameter to select different AFP homepage locales for the wire ticker feed, but that endpoint returns headlines only, not full articles.Does the API expose AFP article content outside AFP Factuel, such as full wire dispatch text?+
How does pagination work for the fact-check listing endpoints?+
get_factcheck_article_list_all, get_factcheck_by_region, and get_factcheck_by_topic all accept an optional zero-based integer page parameter and return the corresponding page value in the response alongside the articles array. Omitting the parameter defaults to page 0. There is no total-page-count field returned, so you iterate until you receive an empty or undersized articles array.