Extract News Links API: article links from any news site
Extract news links from a news website, such as a homepage or a section page. Narrow the links down with a URL prefix and decide whether links to subdomains count with sub-domain.
- Cost
- 1 point
- Input
- A news homepage or section URL
- Auth
- api-key or x-api-key
- Free plan
- Yes
Parameters
url and api-key (or the x-api-key header) are required.
Parameters
| Name | Example | Description |
|---|---|---|
url | https://nytimes.com | The url from which links should be extracted. |
prefix | The prefix the news links must start with. | |
sub-domain | true | Whether to include links to news on sub-domains. |
api-key | abcd1234 | Your API key. |
Response headers
Every response tells you what the request cost and how many points are left today.
Headers
Response Headers:
Content-Type: application/jsonX-API-Quota-Request: The number of points used by the requestX-API-Quota-Used: The number of points used in total todayX-API-Quota-Left: The number of points left today (depends on your plan)
The daily count resets at midnight UTC.
Example request
The article links on the New York Times homepage. Sign in and the examples use your own key.
curl -X GET 'https://api.worldnewsapi.com/extract-news-links?url=https://www.nytimes.com' \
-H 'x-api-key: myapikey' extractNewsLinks, named in each language's style (extract_news_links in Python and Ruby).Example response
{
"news_links": [
"https://www.nytimes.com/2023/10/07/opinion/wnba-liberty-championship.html",
"https://www.nytimes.com/2023/10/08/business/economy/labor-strikes.html",
"https://www.nytimes.com/2023/10/08/dining/sunday-calls-for-old-fashioned-beef-stew.html"
]
} Points
Quotas
The free plan's 50 points a day cover 50 calls.
Plans and pointsRate limits and errors
Requests per plan
- Free
- 1 per second, 1 at a time
- Starter (console offer)
- 2 per second, 1 at a time
- Reporter
- 2 per second, 5 at a time
- Journalist
- 10 per second, 10 at a time
- Editor
- 20 per second, 20 at a time
Error codes
402Daily points used up on the free plan. They reset at midnight UTC.
429Too many requests per second, or too many at the same time.
Frequently asked questions
What does Extract News Links do?
The Extract News Links endpoint takes a news website URL (such as a homepage or section page) and returns all news article links found on that page. This is useful for discovering articles from specific publishers.
How is this different from the Search News endpoint?
Search News searches across all indexed articles by keywords and filters. Extract News Links scrapes a specific URL to find article links on that page. Use Search News for broad discovery and Extract News Links for source-specific crawling.
What types of URLs can I extract links from?
You can extract links from news website homepages, section pages, category pages, and other pages that contain links to news articles. The endpoint works best with major news publisher websites.