Apnews scraper
ExtractHub extractors are versioned web scrapers: each one is a saved scraper for one kind of page that returns structured JSON through an API. For Apnews (apnews.com) there are 3 public extractors: AP News - hub page, AP News - home page and AP News - article. Together they return fields such as title, pageTitle, description, canonicalUrl, sections, stories, url, headline and 17 more fields. Call one with your API key and a pinned extractor_id, from the REST API, the Batch API or an AI agent over MCP.
Apnews scrapers on ExtractHub
-
apnews.com · @extracthub1/apnews-hub@1 (v1.1.0)
Stories listed on an AP News hub (topic / section) page (apnews.com/hub/<topic>): position, headline, link, summary, published and updated time, authors, image and comment count, plus the page title, description and canonical URL, and the sections of the navigation bar (World, U.S., Politics, Sports, ...). Plain fetch.
Fields:
AP News - hub page scraper: fields, versions and examples →title,pageTitle,description,canonicalUrl,sections,stories -
apnews.com · @extracthub1/apnews-home@1 (v1.0.0)
Stories listed on the AP News home page (apnews.com): position, headline, link, summary, published and updated time, authors, image and comment count, plus the page title, description and canonical URL and the sections of the navigation bar (World, U.S., Politics, Sports, ...). Plain fetch. Pairs with @extracthub1/apnews-hub (sections) and @extracthub1/apnews-article.
Fields:
AP News - home page scraper: fields, versions and examples →pageTitle,description,canonicalUrl,sections,stories -
apnews.com · @extracthub1/apnews-article@1 (v1.1.0)
One AP News article (apnews.com/article/...): headline, summary, section, type, published and modified dates, byline and authors with profile links, publisher, lead image with caption, keywords, subheadings, body paragraphs and full text. Plain fetch (JSON-LD NewsArticle + page markup). Also returns the whole body as Markdown (content), with the subheadings in place between the paragraphs.
Fields:
AP News - article scraper: fields, versions and examples →url,headline,summary,section,sectionUrl,articleType,datePublished,dateModified,byline,authorsand 9 more
How to call the Apnews scraper API
Every call needs your API key (X-API-Key) and a pinned extractor_id. This example uses
@extracthub1/apnews-hub@1 (AP News - hub page); open an extractor's page for its batch, Python and Node examples.
curl -X POST "https://api.extracthub.io/api/extractor/extract" \
-H "X-API-Key: $EXTRACTHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"extractor_id": "@extracthub1/apnews-hub@1",
"target": { "url": "https://apnews.com/..." }
}' Use ExtractHub to extract https://apnews.com/... with @extracthub1/apnews-hub@1 {
"tool": "extract",
"arguments": {
"extractor_id": "@extracthub1/apnews-hub@1",
"url": "https://apnews.com/..."
}
} See the web scraping API reference and the web scraping MCP server setup.
Need another Apnews page type?
Build your own Apnews scraper with an AI agent and the extractor builder skill, or in ExtractHub Studio. It stays private until you release it.
Apnews scraper: frequently asked questions
Is there a ready-made Apnews scraper?
Yes. ExtractHub lists 3 public extractors for apnews.com. An extractor is a versioned web scraper for one kind of page: its owner released it as an immutable version with an output schema, and you call that version with your own API key.
What data can I scrape from Apnews?
AP News - hub page returns title, pageTitle, description, canonicalUrl, sections and stories. AP News - home page returns pageTitle, description, canonicalUrl, sections and stories. AP News - article returns url, headline, summary, section, sectionUrl, articleType and 13 more. Every field is listed on the extractor's page with a sample response.
How do I call the Apnews scraper API?
Send GET or POST https://api.extracthub.io/api/extractor/extract with your API key in the X-API-Key header, extractor_id=@extracthub1/apnews-hub@1 and the URL of a apnews.com page as the target. For many URLs use POST https://api.extracthub.io/api/extractor/batch. AI agents call the same extractor through the extract tool of the ExtractHub MCP server at https://api.extracthub.io/mcp.
Can I build my own Apnews scraper?
Yes. Build an extractor for any Apnews page type in ExtractHub Studio, or let an AI agent such as Claude Code build, test and release it with the open-source extractor builder skill. New extractors are private until you release them.