> ## Documentation Index
> Fetch the complete documentation index at: https://newscatcherinc-docs.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to search articles by URL

> Find articles that mention specific URLs or domains using News API.

News API lets you find articles that mention specific URLs or domains using two
dedicated parameters:

| Parameter          | What it matches                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------- |
| `all_links`        | Articles containing a specific full URL — for example, a particular report or article page   |
| `all_domain_links` | Articles containing any URL from a specific domain — for example, all mentions of nvidia.com |

URL-based search is available on the following endpoints:

* `/search`
* `/latest_headlines`
* `/authors`
* `/aggregation_count`

<Note>
  In `GET` requests, specify multiple URLs or domains as comma-separated
  strings. `POST` requests support both comma-separated strings and arrays.
</Note>

## Before you begin

Make sure you have the following:

* An active News API key
* The [Newscatcher SDK](/news-api/libraries/python) installed for your language,
  or cURL for quick testing

## Steps

<Steps>
  <Step title="Make a URL-based search request">
    This example finds English-language articles about AI that mention the
    NVIDIA website:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://v3-api.newscatcherapi.com/api/search" \
        -H "x-api-token: YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "q": "AI",
          "all_domain_links": "nvidia.com",
          "lang": "en"
        }'
      ```

      ```python Python theme={null}
      from newscatcher import NewscatcherApi

      client = NewscatcherApi(api_key="YOUR_API_KEY")

      response = client.search.post(
          q="AI",
          all_domain_links="nvidia.com",
          lang="en",
      )

      for article in response.articles:
          print(article.title)
      ```

      ```typescript TypeScript theme={null}
      import { NewscatcherApiClient } from "newscatcher-sdk";

      const client = new NewscatcherApiClient({ apiKey: "YOUR_API_KEY" });

      const response = await client.search.post({
        q: "AI",
        allDomainLinks: "nvidia.com",
        lang: "en",
      });

      response.articles?.forEach((article) => console.log(article.title));
      ```

      ```java Java theme={null}
      import com.newscatcher.api.NewscatcherApiClient;
      import com.newscatcher.api.resources.search.requests.PostSearchRequest;

      NewscatcherApiClient client = NewscatcherApiClient.builder()
          .apiKey("YOUR_API_KEY")
          .build();

      var response = client.search().post(
          PostSearchRequest.builder()
              .q("AI")
              .allDomainLinks("nvidia.com")
              .lang("en")
              .build()
      );

      response.getArticles().forEach(a -> System.out.println(a.getTitle()));
      ```
    </CodeGroup>
  </Step>

  <Step title="Review the response">
    The response includes the standard article fields plus `all_links` and
    `all_domain_links` arrays showing every URL mentioned in each article:

    ```json theme={null}
    {
      "status": "ok",
      "total_hits": 264,
      "page": 1,
      "total_pages": 3,
      "page_size": 100,
      "articles": [
        {
          "title": "NVIDIA 'Powering Advanced AI' Is The New Tagline For GeForce RTX GPUs",
          "author": "Hassan Mujtaba",
          "published_date": "2024-09-02",
          "link": "https://wccftech.com/nvidia-powering-advanced-ai-new-tagline-geforce-rtx-gpus",
          "domain_url": "wccftech.com",
          "all_links": [
            "https://www.nvidia.com",
            "https://www.amazon.com/dp/B082L36ZRY"
          ],
          "all_domain_links": [
            "nvidia.com",
            "youtube.com",
            "techpowerup.com"
          ]
        }
      ]
    }
    ```
  </Step>

  <Step title="Refine with advanced queries">
    Combine URL parameters with keywords, date ranges, and other filters for
    more targeted searches:

    <AccordionGroup>
      <Accordion title="Track AI reports and their media impact">
        ```json theme={null}
        {
          "q": "AI report",
          "all_links": [
            "https://aiindex.stanford.edu/report/",
            "https://www.stateof.ai/",
            "https://www2.deloitte.com/us/en/pages/consulting/articles/state-of-generative-ai-in-enterprise.html"
          ],
          "from_": "2024-01-01",
          "lang": "en"
        }
        ```
      </Accordion>

      <Accordion title="Monitor AI in healthcare">
        ```json theme={null}
        {
          "q": "AI AND (healthcare OR medicine)",
          "all_domain_links": ["who.int", "nih.gov"],
          "all_links": ["https://www.nature.com/articles/s41591-023-02448-8"],
          "lang": "en",
          "from_": "2024-01-01"
        }
        ```
      </Accordion>

      <Accordion title="Track AI policy from government sources">
        ```json theme={null}
        {
          "q": "AI regulation",
          "all_domain_links": ["europa.eu", "whitehouse.gov", "gov.uk"],
          "lang": "en",
          "from_": "2024-01-01"
        }
        ```
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>

## Best practices

* Use `all_links` to find mentions of specific pages or articles.
* Use `all_domain_links` to track mentions of a website regardless of the
  specific page.
* Combine URL search with date ranges to focus on recent coverage or track
  changes over time.
* Add keyword filters to narrow down broad domain searches that return too many
  results.

## See also

* [Advanced querying](/news-api/guides-and-concepts/advanced-querying)
* [Build search queries](/news-api/how-to/build-search-queries)
* [API Reference](/news-api/api-reference/search/search-articles-post)
