How to search articles by URL
Find articles that mention specific URLs or domains using News API v3
Overview
News API v3 offers powerful URL-based search capabilities, allowing you to find articles that mention specific URLs or domains. This feature is handy for tracking website mentions, monitoring competitors, or analyzing link patterns in news articles.
The API provides two main parameters for URL-based searches:
all_links
: Searches for articles mentioning specific complete URLs.all_domain_links
: Searches for articles mentioning specific domain URLs.
Using these parameters, you can refine your searches and gain valuable insights from news articles on the web.
Before you start
Before you begin, ensure you have:
- An active API key for NewsCatcher News API v3
- Basic knowledge of making API requests
- Python or another tool for making HTTP requests (cURL, Postman, or a programming language with HTTP capabilities)
URL-based search is available on the following endpoints:
/search
/latest_headlines
/authors
/search_similar
/aggregation_count
In GET
requests, you can specify multiple URLs/domains as comma-separated
strings. POST
requests support both comma-separated strings and arrays of
strings.
Steps
Understand URL search parameters
all_links
: Use this parameter to search for articles that mention specific complete URLs. This is useful when you want to find articles linking to exact pages.all_domain_links
: Use this parameter to search for articles that mention specific domain URLs. This is helpful when you want to find articles linking to any page within a domain.
Construct your query
Here’s an example of a basic query using the all_domain_links
parameter:
This query:
- Searches for articles about AI.
- Looks for mentions of the NVIDIA website.
- Limits results to English language articles.
Make an API request
Here’s a Python example demonstrating how to make a POST request with the above query:
Analyze the results
The API returns a JSON response. Here’s a simplified example focusing on URL-related fields:
Refine your URL search
To improve your search results and gain more specific insights, consider these practical examples:
Best practices
- Use
all_links
to find mentions of specific pages or articles. - Use
all_domain_links
to track mentions of a website in general, regardless of the specific page. - Combine URL search with other parameters to create more targeted queries.
- Use date ranges to focus on recent developments or track changes over time.
- Be aware that very broad domain searches might return a large number of results. Use additional filters to narrow down your search.
- Regularly update your queries to track evolving topics and include new relevant URLs or domains.
See also
Was this page helpful?