Skip to content

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.

GET
https://api.worldnewsapi.com/extract-news-links
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
s r q
https://nytimes.comThe url from which links should be extracted.
prefix
s o q
The prefix the news links must start with.
sub-domain
b o q
trueWhether to include links to news on sub-domains.
api-key
s r q
abcd1234Your 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/json
  • X-API-Quota-Request: The number of points used by the request
  • X-API-Quota-Used: The number of points used in total today
  • X-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.

GET https://api.worldnewsapi.com/extract-news-links?url=https://www.nytimes.com
curl -X GET 'https://api.worldnewsapi.com/extract-news-links?url=https://www.nytimes.com' \
  -H 'x-api-key: myapikey'
Prefer a client library? The SDKs wrap this call in 21 languages as extractNewsLinks, named in each language's style (extract_news_links in Python and Ruby).

Example response

200 OKapplication/json
{
  "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

Calling this endpoint costs
1 point


The free plan's 50 points a day cover 50 calls.

Plans and points

Rate 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.

Rate limiting and quotas in detail

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.

Questions? Need help? Ask away