apify-haystack 0.1.8b2__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- <!-- git-cliff-unreleased-start -->
6
- ## 0.1.8 - **not yet released**
5
+ ## [1.0.0](https://github.com/apify/apify-haystack/releases/tag/v1.0.0) (2026-10-27)
7
6
 
8
7
  ### 🚀 Features
9
8
 
@@ -19,6 +18,7 @@ All notable changes to this project will be documented in this file.
19
18
  - Add a default dataset mapping function ([#64](https://github.com/apify/apify-haystack/pull/64)) ([c25c9a3](https://github.com/apify/apify-haystack/commit/c25c9a3160ca7425737abd52986d756d009df9d8)) by [@vdusek](https://github.com/vdusek)
20
19
  - Mark ApifyActorTool output as untrusted external content ([#65](https://github.com/apify/apify-haystack/pull/65)) ([ee93080](https://github.com/apify/apify-haystack/commit/ee930801ccf7ac88ed77be9c27b9dea57a02c038)) by [@vdusek](https://github.com/vdusek)
21
20
  - Add a max_total_charge_usd limit to the Actor runs ([#70](https://github.com/apify/apify-haystack/pull/70)) ([83a8184](https://github.com/apify/apify-haystack/commit/83a81847cc4050cabd44183979440ab944350d95)) by [@vdusek](https://github.com/vdusek)
21
+ - Add support for Python 3.15 ([#37](https://github.com/apify/apify-haystack/pull/37)) ([9a1856e](https://github.com/apify/apify-haystack/commit/9a1856e3a57dd36fc1e528392dc64f089a1d4e33)) by [@vdusek](https://github.com/vdusek)
22
22
 
23
23
  ### 🐛 Bug Fixes
24
24
 
@@ -37,7 +37,6 @@ All notable changes to this project will be documented in this file.
37
37
  - [**breaking**] Drop the unused python-dotenv dependency and move examples out of the package ([#43](https://github.com/apify/apify-haystack/pull/43)) ([9b3de5e](https://github.com/apify/apify-haystack/commit/9b3de5e81babcede7d3287fcacf1189f72d02224)) by [@vdusek](https://github.com/vdusek)
38
38
 
39
39
 
40
- <!-- git-cliff-unreleased-end -->
41
40
  # Changelog
42
41
 
43
42
  ## [0.1.7](https://github.com/apify/apify-haystack/releases/tag/0.1.7) (2024-12-09)
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apify_haystack
3
- Version: 0.1.8b2
4
- Summary: Apify-haystack integration
5
- Keywords: apify,crawler,haystack,rag,scraper,scraping
3
+ Version: 1.0.0
4
+ Summary: Apify integration for Haystack: load Actor results as Documents, search the web, and give Agents access to Apify Actors.
5
+ Keywords: agents,apify,crawler,haystack,llm,rag,scraper,scraping,web-search
6
6
  Author: Apify Technologies s.r.o.
7
7
  Author-email: Apify Technologies s.r.o. <support@apify.com>
8
8
  License-Expression: Apache-2.0
@@ -14,9 +14,10 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
17
18
  Classifier: Topic :: Software Development :: Libraries
18
19
  Classifier: Typing :: Typed
19
- Requires-Dist: apify-client>=3.3.0,<4.0.0
20
+ Requires-Dist: apify-client>=3.4.0,<4.0.0
20
21
  Requires-Dist: haystack-ai>=3.0.0,<4.0.0
21
22
  Requires-Python: >=3.11
22
23
  Project-URL: Homepage, https://apify.com
@@ -37,16 +38,20 @@ The Apify-Haystack integration allows easy interaction between the [Apify](https
37
38
  Apify is a platform for web scraping, data extraction, and web automation tasks.
38
39
  It provides serverless applications called Actors for tasks like crawling websites and scraping Facebook, Instagram, and Google results.
39
40
 
40
- Haystack offers an ecosystem of tools for building, managing, and deploying search engines and LLM applications.
41
+ Haystack is an open-source framework for building LLM applications, RAG pipelines, and agents.
42
+
43
+ For a step-by-step guide, see the [Haystack integration](https://docs.apify.com/platform/integrations/haystack) page in the Apify documentation.
41
44
 
42
45
  ## Installation
43
46
 
44
- Apify-haystack is available as the [`apify-haystack`](https://pypi.org/project/apify-haystack/) package on PyPI. It requires Python 3.11 or newer and Haystack 3.
47
+ The integration is available as the [`apify-haystack`](https://pypi.org/project/apify-haystack/) package on PyPI. It requires Python 3.11 or newer and Haystack 3.
45
48
 
46
49
  ```sh
47
50
  pip install apify-haystack
48
51
  ```
49
52
 
53
+ Upgrading from 0.1.x? See [UPGRADING.md](https://github.com/apify/apify-haystack/blob/main/UPGRADING.md).
54
+
50
55
  ## Components
51
56
 
52
57
  - `ApifyDatasetFromActorCall` runs an Actor, waits for it to finish, and loads its default dataset.
@@ -55,46 +60,35 @@ pip install apify-haystack
55
60
  - `ApifyWebSearch` searches the web with the [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor and returns the content of the top result pages.
56
61
  - `ApifyActorTool` is a tool for Haystack Agents that runs any Actor and returns its dataset items. It takes its parameters from the Actor's input schema, and it marks the items it hands to the LLM as untrusted external content to guard against prompt injection.
57
62
 
58
- The dataset components turn dataset items into Haystack `Document` objects with a mapping function. Without one, they use `default_dataset_mapping_function`, which takes the `markdown` or `text` of website and search Actors with the page `url`, `title`, and `description` as `meta`, and the whole item as JSON for other Actors. Every component also has `run_async`, which `Pipeline.run_async` uses to run it without blocking the event loop. When an Actor or task run finishes with any status other than `SUCCEEDED`, the component raises a `RuntimeError` instead of loading a partial dataset.
63
+ The dataset components turn dataset items into Haystack `Document` objects with a mapping function. Without one, they use `default_dataset_mapping_function`. For website and search Actors, it takes the item's `markdown` or `text` as the content and the page `url`, `title`, and `description` as `meta`. For other Actors, the content is the whole item as JSON.
64
+
65
+ Every component also has `run_async`, which `Pipeline.run_async` uses to run it without blocking the event loop.
66
+
67
+ When an Actor or task run finishes with any status other than `SUCCEEDED`, the component raises a `RuntimeError`.
59
68
 
60
69
  The components read your Apify API token from the `APIFY_TOKEN` environment variable, or from `APIFY_API_TOKEN` if `APIFY_TOKEN` isn't set. To pass the token differently, use a Haystack `Secret`, for example `apify_token=Secret.from_env_var('MY_APIFY_TOKEN')`.
61
70
 
62
71
  ## Examples
63
72
 
64
- ### Crawl a website using Apify's Website Content Crawler and convert it to Haystack Documents
73
+ The examples need an Apify account and API token. You can start with a free account at [Apify](https://apify.com/) and get your [API token](https://docs.apify.com/platform/integrations/api), then set it as the `APIFY_TOKEN` environment variable.
65
74
 
66
- You need an Apify account and API token to run this example.
67
- You can start with a free account at [Apify](https://apify.com/) and get your [API token](https://docs.apify.com/platform/integrations/api).
75
+ ### Crawl a website and load it as Documents
68
76
 
69
- In the example below, set the `APIFY_TOKEN` environment variable and run the script:
77
+ `ApifyDatasetFromActorCall` runs [Website Content Crawler](https://apify.com/apify/website-content-crawler) and loads the crawled pages as `Document` objects with the default mapping function:
70
78
 
71
79
  ```python
72
- from haystack import Document
73
-
74
80
  from apify_haystack import ApifyDatasetFromActorCall
75
81
 
76
- actor_id = 'apify/website-content-crawler'
77
- run_input = {
78
- 'maxCrawlPages': 3, # limit the number of pages to crawl
79
- 'startUrls': [{'url': 'https://haystack.deepset.ai/'}],
80
- }
81
-
82
-
83
- def dataset_mapping_function(dataset_item: dict) -> Document:
84
- return Document(content=dataset_item.get('text'), meta={'url': dataset_item.get('url')})
85
-
86
-
87
- actor = ApifyDatasetFromActorCall(
88
- actor_id=actor_id, run_input=run_input, dataset_mapping_function=dataset_mapping_function
82
+ crawler = ApifyDatasetFromActorCall(
83
+ actor_id='apify/website-content-crawler',
84
+ run_input={
85
+ 'maxCrawlPages': 3,
86
+ 'startUrls': [{'url': 'https://haystack.deepset.ai/'}],
87
+ },
89
88
  )
90
- print(f'Calling the Apify Actor {actor_id}. Crawling will take some time.')
91
- print('You can monitor the progress at: https://console.apify.com/actors/runs')
92
89
 
93
- dataset = actor.run()['documents']
94
-
95
- print(f'Loaded {len(dataset)} documents from the Apify Actor {actor_id}:')
96
- for d in dataset:
97
- print(d)
90
+ for document in crawler.run()['documents']:
91
+ print(document.meta['url'], document.content[:100])
98
92
  ```
99
93
 
100
94
  ### Search the web
@@ -131,29 +125,34 @@ print(result['last_message'].text)
131
125
 
132
126
  ### Save and load a pipeline
133
127
 
134
- The components and the tool support Haystack serialization. The token is saved as the name of its environment variable, never as its value. Haystack 3 only loads classes and functions from trusted modules, so allow `apify_haystack` and the module with your mapping function:
128
+ The components and the tool support Haystack serialization. The token is saved as the name of its environment variable, never as its value. Haystack 3 only loads classes and functions from trusted modules, so pass `apify_haystack` in `allowed_modules`, along with the module of your mapping function if you use a custom one:
135
129
 
136
130
  ```python
137
131
  from haystack import Pipeline
138
132
 
133
+ from apify_haystack import ApifyDatasetLoader
134
+
135
+ pipeline = Pipeline()
136
+ pipeline.add_component('loader', ApifyDatasetLoader('YOUR-DATASET-ID'))
137
+
139
138
  yaml = pipeline.dumps()
140
- restored = Pipeline.loads(yaml, allowed_modules=['apify_haystack', 'my_project.mapping'])
139
+ restored = Pipeline.loads(yaml, allowed_modules=['apify_haystack'])
141
140
  ```
142
141
 
143
142
  ### More examples
144
143
 
145
- The [examples directory](https://github.com/apify/apify-haystack/tree/main/examples) has more examples:
144
+ The [examples directory](https://github.com/apify/apify-haystack/tree/main/examples) has complete scripts:
146
145
 
147
- - Load a dataset from Apify and convert it to a Haystack Document
148
- - Call [Website Content Crawler](https://apify.com/apify/website-content-crawler) and convert the data into the Haystack Documents
149
- - Crawl websites, retrieve text content, and store it in the `InMemoryDocumentStore`
150
- - Retrieval-Augmented Generation (RAG): Extracting text from a website & question answering <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_rag.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
151
- - Analyze your Instagram comments' vibe with Apify and Haystack <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_instagram_comments_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
146
+ - [Load an existing dataset](https://github.com/apify/apify-haystack/blob/main/examples/apify_dataset_load.py) and convert its items to Documents.
147
+ - [Call Website Content Crawler](https://github.com/apify/apify-haystack/blob/main/examples/apify_actor_call.py) with a custom mapping function.
148
+ - [Crawl a website, store the pages in `InMemoryDocumentStore`, and retrieve them](https://github.com/apify/apify-haystack/blob/main/examples/crawl_and_process_data.py).
149
+ - [Answer questions about a crawled website with RAG](https://github.com/apify/apify-haystack/blob/main/examples/rag_with_crawled_website.py). <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_rag.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
150
+ - [Analyze the sentiment of Instagram comments](https://github.com/apify/apify-haystack/blob/main/examples/instagram_comments_analysis.py). <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_instagram_comments_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
152
151
 
153
152
  ## Support
154
153
 
155
- If you find any bug or issue, please [submit an issue on GitHub](https://github.com/apify/apify-haystack/issues).
156
- For questions, you can ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/apify), in GitHub Discussions or you can join our [Discord server](https://discord.com/invite/jyEM2PRvMU).
154
+ If you find a bug, please [submit an issue on GitHub](https://github.com/apify/apify-haystack/issues).
155
+ For questions, ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/apify) or join our [Discord server](https://discord.com/invite/jyEM2PRvMU).
157
156
 
158
157
  ## Contributing
159
158
 
@@ -163,4 +162,4 @@ For contribution guidelines, see [CONTRIBUTING.md](https://github.com/apify/apif
163
162
 
164
163
  ## License
165
164
 
166
- This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/apify/apify-haystack/blob/main/LICENSE) file for details.
165
+ This project is licensed under the [Apache License 2.0](https://github.com/apify/apify-haystack/blob/main/LICENSE).
@@ -9,16 +9,20 @@ The Apify-Haystack integration allows easy interaction between the [Apify](https
9
9
  Apify is a platform for web scraping, data extraction, and web automation tasks.
10
10
  It provides serverless applications called Actors for tasks like crawling websites and scraping Facebook, Instagram, and Google results.
11
11
 
12
- Haystack offers an ecosystem of tools for building, managing, and deploying search engines and LLM applications.
12
+ Haystack is an open-source framework for building LLM applications, RAG pipelines, and agents.
13
+
14
+ For a step-by-step guide, see the [Haystack integration](https://docs.apify.com/platform/integrations/haystack) page in the Apify documentation.
13
15
 
14
16
  ## Installation
15
17
 
16
- Apify-haystack is available as the [`apify-haystack`](https://pypi.org/project/apify-haystack/) package on PyPI. It requires Python 3.11 or newer and Haystack 3.
18
+ The integration is available as the [`apify-haystack`](https://pypi.org/project/apify-haystack/) package on PyPI. It requires Python 3.11 or newer and Haystack 3.
17
19
 
18
20
  ```sh
19
21
  pip install apify-haystack
20
22
  ```
21
23
 
24
+ Upgrading from 0.1.x? See [UPGRADING.md](https://github.com/apify/apify-haystack/blob/main/UPGRADING.md).
25
+
22
26
  ## Components
23
27
 
24
28
  - `ApifyDatasetFromActorCall` runs an Actor, waits for it to finish, and loads its default dataset.
@@ -27,46 +31,35 @@ pip install apify-haystack
27
31
  - `ApifyWebSearch` searches the web with the [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor and returns the content of the top result pages.
28
32
  - `ApifyActorTool` is a tool for Haystack Agents that runs any Actor and returns its dataset items. It takes its parameters from the Actor's input schema, and it marks the items it hands to the LLM as untrusted external content to guard against prompt injection.
29
33
 
30
- The dataset components turn dataset items into Haystack `Document` objects with a mapping function. Without one, they use `default_dataset_mapping_function`, which takes the `markdown` or `text` of website and search Actors with the page `url`, `title`, and `description` as `meta`, and the whole item as JSON for other Actors. Every component also has `run_async`, which `Pipeline.run_async` uses to run it without blocking the event loop. When an Actor or task run finishes with any status other than `SUCCEEDED`, the component raises a `RuntimeError` instead of loading a partial dataset.
34
+ The dataset components turn dataset items into Haystack `Document` objects with a mapping function. Without one, they use `default_dataset_mapping_function`. For website and search Actors, it takes the item's `markdown` or `text` as the content and the page `url`, `title`, and `description` as `meta`. For other Actors, the content is the whole item as JSON.
35
+
36
+ Every component also has `run_async`, which `Pipeline.run_async` uses to run it without blocking the event loop.
37
+
38
+ When an Actor or task run finishes with any status other than `SUCCEEDED`, the component raises a `RuntimeError`.
31
39
 
32
40
  The components read your Apify API token from the `APIFY_TOKEN` environment variable, or from `APIFY_API_TOKEN` if `APIFY_TOKEN` isn't set. To pass the token differently, use a Haystack `Secret`, for example `apify_token=Secret.from_env_var('MY_APIFY_TOKEN')`.
33
41
 
34
42
  ## Examples
35
43
 
36
- ### Crawl a website using Apify's Website Content Crawler and convert it to Haystack Documents
44
+ The examples need an Apify account and API token. You can start with a free account at [Apify](https://apify.com/) and get your [API token](https://docs.apify.com/platform/integrations/api), then set it as the `APIFY_TOKEN` environment variable.
37
45
 
38
- You need an Apify account and API token to run this example.
39
- You can start with a free account at [Apify](https://apify.com/) and get your [API token](https://docs.apify.com/platform/integrations/api).
46
+ ### Crawl a website and load it as Documents
40
47
 
41
- In the example below, set the `APIFY_TOKEN` environment variable and run the script:
48
+ `ApifyDatasetFromActorCall` runs [Website Content Crawler](https://apify.com/apify/website-content-crawler) and loads the crawled pages as `Document` objects with the default mapping function:
42
49
 
43
50
  ```python
44
- from haystack import Document
45
-
46
51
  from apify_haystack import ApifyDatasetFromActorCall
47
52
 
48
- actor_id = 'apify/website-content-crawler'
49
- run_input = {
50
- 'maxCrawlPages': 3, # limit the number of pages to crawl
51
- 'startUrls': [{'url': 'https://haystack.deepset.ai/'}],
52
- }
53
-
54
-
55
- def dataset_mapping_function(dataset_item: dict) -> Document:
56
- return Document(content=dataset_item.get('text'), meta={'url': dataset_item.get('url')})
57
-
58
-
59
- actor = ApifyDatasetFromActorCall(
60
- actor_id=actor_id, run_input=run_input, dataset_mapping_function=dataset_mapping_function
53
+ crawler = ApifyDatasetFromActorCall(
54
+ actor_id='apify/website-content-crawler',
55
+ run_input={
56
+ 'maxCrawlPages': 3,
57
+ 'startUrls': [{'url': 'https://haystack.deepset.ai/'}],
58
+ },
61
59
  )
62
- print(f'Calling the Apify Actor {actor_id}. Crawling will take some time.')
63
- print('You can monitor the progress at: https://console.apify.com/actors/runs')
64
60
 
65
- dataset = actor.run()['documents']
66
-
67
- print(f'Loaded {len(dataset)} documents from the Apify Actor {actor_id}:')
68
- for d in dataset:
69
- print(d)
61
+ for document in crawler.run()['documents']:
62
+ print(document.meta['url'], document.content[:100])
70
63
  ```
71
64
 
72
65
  ### Search the web
@@ -103,29 +96,34 @@ print(result['last_message'].text)
103
96
 
104
97
  ### Save and load a pipeline
105
98
 
106
- The components and the tool support Haystack serialization. The token is saved as the name of its environment variable, never as its value. Haystack 3 only loads classes and functions from trusted modules, so allow `apify_haystack` and the module with your mapping function:
99
+ The components and the tool support Haystack serialization. The token is saved as the name of its environment variable, never as its value. Haystack 3 only loads classes and functions from trusted modules, so pass `apify_haystack` in `allowed_modules`, along with the module of your mapping function if you use a custom one:
107
100
 
108
101
  ```python
109
102
  from haystack import Pipeline
110
103
 
104
+ from apify_haystack import ApifyDatasetLoader
105
+
106
+ pipeline = Pipeline()
107
+ pipeline.add_component('loader', ApifyDatasetLoader('YOUR-DATASET-ID'))
108
+
111
109
  yaml = pipeline.dumps()
112
- restored = Pipeline.loads(yaml, allowed_modules=['apify_haystack', 'my_project.mapping'])
110
+ restored = Pipeline.loads(yaml, allowed_modules=['apify_haystack'])
113
111
  ```
114
112
 
115
113
  ### More examples
116
114
 
117
- The [examples directory](https://github.com/apify/apify-haystack/tree/main/examples) has more examples:
115
+ The [examples directory](https://github.com/apify/apify-haystack/tree/main/examples) has complete scripts:
118
116
 
119
- - Load a dataset from Apify and convert it to a Haystack Document
120
- - Call [Website Content Crawler](https://apify.com/apify/website-content-crawler) and convert the data into the Haystack Documents
121
- - Crawl websites, retrieve text content, and store it in the `InMemoryDocumentStore`
122
- - Retrieval-Augmented Generation (RAG): Extracting text from a website & question answering <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_rag.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
123
- - Analyze your Instagram comments' vibe with Apify and Haystack <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_instagram_comments_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
117
+ - [Load an existing dataset](https://github.com/apify/apify-haystack/blob/main/examples/apify_dataset_load.py) and convert its items to Documents.
118
+ - [Call Website Content Crawler](https://github.com/apify/apify-haystack/blob/main/examples/apify_actor_call.py) with a custom mapping function.
119
+ - [Crawl a website, store the pages in `InMemoryDocumentStore`, and retrieve them](https://github.com/apify/apify-haystack/blob/main/examples/crawl_and_process_data.py).
120
+ - [Answer questions about a crawled website with RAG](https://github.com/apify/apify-haystack/blob/main/examples/rag_with_crawled_website.py). <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_rag.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
121
+ - [Analyze the sentiment of Instagram comments](https://github.com/apify/apify-haystack/blob/main/examples/instagram_comments_analysis.py). <a href="https://colab.research.google.com/github/deepset-ai/haystack-cookbook/blob/main/notebooks/apify_haystack_instagram_comments_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
124
122
 
125
123
  ## Support
126
124
 
127
- If you find any bug or issue, please [submit an issue on GitHub](https://github.com/apify/apify-haystack/issues).
128
- For questions, you can ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/apify), in GitHub Discussions or you can join our [Discord server](https://discord.com/invite/jyEM2PRvMU).
125
+ If you find a bug, please [submit an issue on GitHub](https://github.com/apify/apify-haystack/issues).
126
+ For questions, ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/apify) or join our [Discord server](https://discord.com/invite/jyEM2PRvMU).
129
127
 
130
128
  ## Contributing
131
129
 
@@ -135,4 +133,4 @@ For contribution guidelines, see [CONTRIBUTING.md](https://github.com/apify/apif
135
133
 
136
134
  ## License
137
135
 
138
- This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/apify/apify-haystack/blob/main/LICENSE) file for details.
136
+ This project is licensed under the [Apache License 2.0](https://github.com/apify/apify-haystack/blob/main/LICENSE).
@@ -4,8 +4,8 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify_haystack"
7
- version = "0.1.8b2"
8
- description = "Apify-haystack integration"
7
+ version = "1.0.0"
8
+ description = "Apify integration for Haystack: load Actor results as Documents, search the web, and give Agents access to Apify Actors."
9
9
  license = "Apache-2.0"
10
10
  license-files = ["LICENSE"]
11
11
  readme = "README.md"
@@ -18,19 +18,23 @@ classifiers = [
18
18
  "Programming Language :: Python :: 3.12",
19
19
  "Programming Language :: Python :: 3.13",
20
20
  "Programming Language :: Python :: 3.14",
21
+ "Programming Language :: Python :: 3.15",
21
22
  "Topic :: Software Development :: Libraries",
22
23
  "Typing :: Typed",
23
24
  ]
24
25
  keywords = [
26
+ "agents",
25
27
  "apify",
26
28
  "crawler",
27
29
  "haystack",
30
+ "llm",
28
31
  "rag",
29
32
  "scraper",
30
33
  "scraping",
34
+ "web-search",
31
35
  ]
32
36
  dependencies = [
33
- "apify-client>=3.3.0,<4.0.0",
37
+ "apify-client>=3.4.0,<4.0.0",
34
38
  "haystack-ai>=3.0.0,<4.0.0",
35
39
  ]
36
40
 
@@ -4,8 +4,8 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify_haystack"
7
- version = "0.1.8b2"
8
- description = "Apify-haystack integration"
7
+ version = "1.0.0"
8
+ description = "Apify integration for Haystack: load Actor results as Documents, search the web, and give Agents access to Apify Actors."
9
9
  authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
10
10
  license = "Apache-2.0"
11
11
  license-files = ["LICENSE"]
@@ -19,12 +19,13 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.12",
20
20
  "Programming Language :: Python :: 3.13",
21
21
  "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
22
23
  "Topic :: Software Development :: Libraries",
23
24
  "Typing :: Typed",
24
25
  ]
25
- keywords = ["apify", "crawler", "haystack", "rag", "scraper", "scraping"]
26
+ keywords = ["agents", "apify", "crawler", "haystack", "llm", "rag", "scraper", "scraping", "web-search"]
26
27
  dependencies = [
27
- "apify-client>=3.3.0,<4.0.0",
28
+ "apify-client>=3.4.0,<4.0.0",
28
29
  "haystack-ai>=3.0.0,<4.0.0",
29
30
  ]
30
31
 
@@ -58,12 +58,11 @@ class ApifyClientComponent:
58
58
 
59
59
  def create_client(client_class: type[_ClientT], token: str | None) -> _ClientT:
60
60
  """Create an Apify client that identifies its requests as coming from this integration."""
61
- client = client_class(token, headers={'x-apify-integration-platform': HAYSTACK_INTEGRATION_PLATFORM})
62
-
63
- # Older platform paths attribute requests by the user-agent marker. Passing it through `headers` would replace
64
- # apify-client's own user agent, so the header is extended in place.
65
- client.http_client._headers['User-Agent'] += f'; {HAYSTACK_ATTRIBUTE_USER_AGENT}' # noqa: SLF001
66
- return client
61
+ return client_class(
62
+ token,
63
+ headers={'x-apify-integration-platform': HAYSTACK_INTEGRATION_PLATFORM},
64
+ user_agent_suffix=HAYSTACK_ATTRIBUTE_USER_AGENT,
65
+ )
67
66
 
68
67
 
69
68
  def get_dataset_id(run: Run | None, label: str) -> str:
File without changes