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

# Find Sources

Bigdata's ecosystem comprises key high-quality content
sources, including web content, premium news, press wires, call
transcripts, and regulatory filings, sourced from more than 13,000
sources.

These sources are classified based on their country and the retention period
of the content they provide and then ranked based on their influence and
trustworthiness of the provider.

* Rank 1: Sources that are fully accountable, reputable, and balanced.
* Rank 2: Sources that are official, reliable, and honest.
* Rank 3: Sources that are acknowledged, formal, and credible.
* Rank 4: Sources that are known and reasonably credible.
* Rank 5: Sources that have satisfactory credibility.

The `knowledge_graph` service provides a way to search for these sources
and retrieve them based on various criteria such as their name, country,
source rank, and retention period. This allows users to filter and find
the sources that best fit their needs for analysis and research.

## Usage

The simplest way to search for sources in Bigdata by using **Find Sources**

<CodeGroup>
  ```bash API highlight={1,5} theme={null}
  curl -X POST 'https://api.bigdata.com/v1/knowledge-graph/sources' \
    -H 'Content-Type: application/json' \
    -H 'X-API-KEY: <your-api-key>' \
    --data '{
    "query": "Business Insider"
  }'
  ```

  ```python Python SDK theme={null}
  sources = bigdata.knowledge_graph.find_sources("Business Insider")

  for source in sources:
      print(source)
  ```
</CodeGroup>

### Filtering sources by details

If you want to find all sources that match some specific criteria,
you can use **Find Sources** to filter all sources available in Bigdata by country,
source rank, category (only supported in the API), packages (only supported in the API),
and retention period (only supported in the Python SDK).

For example, to retrieve sources from the United States and a source rank of 1, you can use the following code:
<Info>Note how the `values` parameter is left unset</Info>

<CodeGroup>
  ```bash API highlight={1,5-10} theme={null}
  curl -X POST 'https://api.bigdata.com/v1/knowledge-graph/sources' \
    -H 'Content-Type: application/json' \
    -H 'X-API-KEY: <your-api-key>' \
    --data '{
    "countries": [
      "US"
    ],
    "ranks": [
      "RANK_1"
    ]
  }'
  ```

  ```python Python SDK theme={null}
  from bigdata_client.models.sources import SourceRank, SourceRetentionPeriod

  sources = bigdata.knowledge_graph.find_sources(
      country="US",
      rank=SourceRank.RANK_1,
  )
  ```
</CodeGroup>

<Note>
  The country parameter follows the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
</Note>

### Advanced usage

For more advanced usage, in the Python SDK you can increase the limit on how many sources to retrieve and provide
multiple values to each of the filtering parameters. For example, to retrieve 100 sources from
the United States and Canada with a source rank of 1 and 2 and a retention
period of 5 years or full history, you can use the following code:

```python Advanced usage theme={null}
sources = bigdata.knowledge_graph.find_sources(
    country=["US", "CA"],
    rank=[SourceRank.RANK_1, SourceRank.RANK_2],
    retention=[
        SourceRetentionPeriod.FIVE_YEARS,
        SourceRetentionPeriod.FULL_HISTORY
    ],
    limit=100
)
```

<Note>
  The `limit` parameter is optional and by default is set to 20. The maximum value is 1000.
</Note>

## Next steps

Once you have found the set of sources you are interested in, you can use them to filter
your search queries. This allows you to focus on specific content providers. Some examples of
how to use the sources for filtering a search query can be found in the
[Search with specific sources](../../how-to-guides/search_with_specific_sources) guide.
