
OpenSearch Integration
No credit card required

OpenSearch Integration
No credit card required
Transfer data from Apify Actors to Amazon OpenSearch Service. This Actor is a good starting point for building question-answering systems, search functionality, or Retrieval-Augmented Generation (RAG) use cases.
You can access the OpenSearch Integration programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1{
2 "openapi": "3.0.1",
3 "info": {
4 "version": "0.0",
5 "x-build-id": "WAY6AbF0GpaL1W8dH"
6 },
7 "servers": [
8 {
9 "url": "https://api.apify.com/v2"
10 }
11 ],
12 "paths": {
13 "/acts/apify~opensearch-integration/run-sync-get-dataset-items": {
14 "post": {
15 "operationId": "run-sync-get-dataset-items-apify-opensearch-integration",
16 "x-openai-isConsequential": false,
17 "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18 "tags": [
19 "Run Actor"
20 ],
21 "requestBody": {
22 "required": true,
23 "content": {
24 "application/json": {
25 "schema": {
26 "$ref": "#/components/schemas/inputSchema"
27 }
28 }
29 }
30 },
31 "parameters": [
32 {
33 "name": "token",
34 "in": "query",
35 "required": true,
36 "schema": {
37 "type": "string"
38 },
39 "description": "Enter your Apify token here"
40 }
41 ],
42 "responses": {
43 "200": {
44 "description": "OK"
45 }
46 }
47 }
48 },
49 "/acts/apify~opensearch-integration/runs": {
50 "post": {
51 "operationId": "runs-sync-apify-opensearch-integration",
52 "x-openai-isConsequential": false,
53 "summary": "Executes an Actor and returns information about the initiated run in response.",
54 "tags": [
55 "Run Actor"
56 ],
57 "requestBody": {
58 "required": true,
59 "content": {
60 "application/json": {
61 "schema": {
62 "$ref": "#/components/schemas/inputSchema"
63 }
64 }
65 }
66 },
67 "parameters": [
68 {
69 "name": "token",
70 "in": "query",
71 "required": true,
72 "schema": {
73 "type": "string"
74 },
75 "description": "Enter your Apify token here"
76 }
77 ],
78 "responses": {
79 "200": {
80 "description": "OK",
81 "content": {
82 "application/json": {
83 "schema": {
84 "$ref": "#/components/schemas/runsResponseSchema"
85 }
86 }
87 }
88 }
89 }
90 }
91 },
92 "/acts/apify~opensearch-integration/run-sync": {
93 "post": {
94 "operationId": "run-sync-apify-opensearch-integration",
95 "x-openai-isConsequential": false,
96 "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97 "tags": [
98 "Run Actor"
99 ],
100 "requestBody": {
101 "required": true,
102 "content": {
103 "application/json": {
104 "schema": {
105 "$ref": "#/components/schemas/inputSchema"
106 }
107 }
108 }
109 },
110 "parameters": [
111 {
112 "name": "token",
113 "in": "query",
114 "required": true,
115 "schema": {
116 "type": "string"
117 },
118 "description": "Enter your Apify token here"
119 }
120 ],
121 "responses": {
122 "200": {
123 "description": "OK"
124 }
125 }
126 }
127 }
128 },
129 "components": {
130 "schemas": {
131 "inputSchema": {
132 "type": "object",
133 "required": [
134 "openSearchUrl",
135 "awsAccessKeyId",
136 "awsSecretAccessKey",
137 "openSearchIndexName",
138 "embeddingsProvider",
139 "embeddingsApiKey",
140 "datasetFields"
141 ],
142 "properties": {
143 "openSearchUrl": {
144 "title": "OpenSearch URL",
145 "type": "string",
146 "description": "The URL of the Amazon OpenSearch Service instance to connect to"
147 },
148 "awsAccessKeyId": {
149 "title": "AWS Access Key ID",
150 "type": "string",
151 "description": "The AWS access key ID for the Amazon OpenSearch Service"
152 },
153 "awsSecretAccessKey": {
154 "title": "AWS Secret Access Key",
155 "type": "string",
156 "description": "The AWS secret access key for the Amazon OpenSearch Service"
157 },
158 "openSearchIndexName": {
159 "title": "OpenSearch Index Name",
160 "type": "string",
161 "description": "The name of the index in the Amazon OpenSearch Service where the data will be stored"
162 },
163 "autoCreateIndex": {
164 "title": "Auto-create index",
165 "type": "boolean",
166 "description": "When set to true, the integration will automatically create the index if it does not exist in the Amazon OpenSearch Service instance",
167 "default": true
168 },
169 "awsRegion": {
170 "title": "AWS Region",
171 "type": "string",
172 "description": "The AWS region where the Amazon OpenSearch Service instance is located",
173 "default": "us-east-1"
174 },
175 "awsServiceName": {
176 "title": "AWS Service Name",
177 "enum": [
178 "aoss",
179 "es"
180 ],
181 "type": "string",
182 "description": "The AWS service name for the Amazon OpenSearch Service",
183 "default": "aoss"
184 },
185 "useSsl": {
186 "title": "Use SSL",
187 "type": "boolean",
188 "description": "When set to true, the integration will use SSL to connect to the Amazon OpenSearch Service instance",
189 "default": true
190 },
191 "verifyCerts": {
192 "title": "Verify SSL certificates",
193 "type": "boolean",
194 "description": "When set to true, the integration will verify SSL certificates when connecting to the Amazon OpenSearch Service instance",
195 "default": true
196 },
197 "useAWS4Auth": {
198 "title": "Use AWS4 authentication",
199 "type": "boolean",
200 "description": "When enabled, the integration will use AWS4 authentication to connect to the Amazon OpenSearch Service instance.\n\nNote: If you are connecting to an OpenSearch Service instance that is not hosted on AWS, set this to false. In this case, AWS credentials are not required and will be ignored. You can provide dummy values for awsAccessKeyId and awsSecretAccessKey.",
201 "default": true
202 },
203 "embeddingsProvider": {
204 "title": "Embeddings provider (as defined in the langchain API)",
205 "enum": [
206 "OpenAI",
207 "Cohere"
208 ],
209 "type": "string",
210 "description": "Choose the embeddings provider to use for generating embeddings",
211 "default": "OpenAI"
212 },
213 "embeddingsConfig": {
214 "title": "Configuration for embeddings provider",
215 "type": "object",
216 "description": "Configure the parameters for the LangChain embedding class. Key points to consider:\n\n1. Typically, you only need to specify the model name. For example, for OpenAI, set the model name as `{\"model\": \"text-embedding-3-small\"}`.\n\n2. It's crucial to ensure that the vector size of your embeddings matches the size of embeddings in the database.\n\n\n\n3. Always specify the model in the following format `{\"model\": \"your-embedding-model-name\"}`\n\n4. Here are some examples of embedding models names:\n - [OpenAI](https://platform.openai.com/docs/guides/embeddings): `{text-embedding-3-small`, `text-embedding-3-large`, etc.\n - [Cohere](https://docs.cohere.com/docs/cohere-embed): `embed-english-v3.0`, `embed-multilingual-light-v3.0`, etc.\n\n4. For more details about other parameters, refer to the [LangChain documentation](https://python.langchain.com/v0.2/docs/integrations/text_embedding/)."
217 },
218 "embeddingsApiKey": {
219 "title": "Embeddings API KEY (whenever applicable, depends on provider)",
220 "type": "string",
221 "description": "Value of the API KEY for the embeddings provider (if required).\n\n For example for OpenAI it is OPENAI_API_KEY, for Cohere it is COHERE_API_KEY)"
222 },
223 "datasetFields": {
224 "title": "Dataset fields to select from the dataset results and store in the database",
225 "type": "array",
226 "description": "This array specifies the dataset fields to be selected and stored in the vector store. Only the fields listed here will be included in the vector store.\n\nFor instance, when using the Website Content Crawler, you might choose to include fields such as `text`, `url`, and `metadata.title` in the vector store.",
227 "default": [
228 "text"
229 ],
230 "items": {
231 "type": "string"
232 }
233 },
234 "metadataDatasetFields": {
235 "title": "Dataset fields to select from the dataset and store as metadata in the database",
236 "type": "object",
237 "description": "A list of dataset fields which should be selected from the dataset and stored as metadata in the vector stores.\n\nFor example, when using the Website Content Crawler, you might want to store `url` in metadata. In this case, use `metadataDatasetFields parameter as follows {\"url\": \"url\"}`"
238 },
239 "metadataObject": {
240 "title": "Custom object to be stored as metadata in the vector store database",
241 "type": "object",
242 "description": "This object allows you to store custom metadata for every item in the vector store.\n\nFor example, if you want to store the `domain` as metadata, use the `metadataObject` like this: {\"domain\": \"apify.com\"}."
243 },
244 "datasetId": {
245 "title": "Dataset ID",
246 "type": "string",
247 "description": "Dataset ID (when running standalone without integration)"
248 },
249 "enableDeltaUpdates": {
250 "title": "Enable incremental updates for objects based on deltas",
251 "type": "boolean",
252 "description": "When set to true, this setting enables incremental updates for objects in the database by comparing the changes (deltas) between the crawled dataset items and the existing objects, uniquely identified by the `datasetKeysToItemId` field.\n\n The integration will only add new objects and update those that have changed, reducing unnecessary updates. The `datasetFields`, `metadataDatasetFields`, and `metadataObject` fields are used to determine the changes.",
253 "default": true
254 },
255 "deltaUpdatesPrimaryDatasetFields": {
256 "title": "Dataset fields to uniquely identify dataset items (only relevant when `enableDeltaUpdates` is enabled)",
257 "type": "array",
258 "description": "This array contains fields that are used to uniquely identify dataset items, which helps to handle content changes across different runs.\n\nFor instance, in a web content crawling scenario, the `url` field could serve as a unique identifier for each item.",
259 "default": [
260 "url"
261 ],
262 "items": {
263 "type": "string"
264 }
265 },
266 "deleteExpiredObjects": {
267 "title": "Delete expired objects from the database",
268 "type": "boolean",
269 "description": "When set to true, delete objects from the database that have not been crawled for a specified period.",
270 "default": true
271 },
272 "expiredObjectDeletionPeriodDays": {
273 "title": "Delete expired objects from the database after a specified number of days",
274 "minimum": 0,
275 "type": "integer",
276 "description": "This setting allows the integration to manage the deletion of objects from the database that have not been crawled for a specified period. It is typically used in subsequent runs after the initial crawl.\n\nWhen the value is greater than 0, the integration checks if objects have been seen within the last X days (determined by the expiration period). If the objects are expired, they are deleted from the database. The specific value for `deletedExpiredObjectsDays` depends on your use case and how frequently you crawl data.\n\nFor example, if you crawl data daily, you can set `deletedExpiredObjectsDays` to 7 days. If you crawl data weekly, you can set `deletedExpiredObjectsDays` to 30 days.",
277 "default": 30
278 },
279 "performChunking": {
280 "title": "Enable text chunking",
281 "type": "boolean",
282 "description": "When set to true, the text will be divided into smaller chunks based on the settings provided below. Proper chunking helps optimize retrieval and ensures accurate and efficient responses.",
283 "default": true
284 },
285 "chunkSize": {
286 "title": "Maximum chunk size",
287 "minimum": 1,
288 "type": "integer",
289 "description": "Defines the maximum number of characters in each text chunk. Choosing the right size balances between detailed context and system performance. Optimal sizes ensure high relevancy and minimal response time.",
290 "default": 2000
291 },
292 "chunkOverlap": {
293 "title": "Chunk overlap",
294 "minimum": 0,
295 "type": "integer",
296 "description": "Specifies the number of overlapping characters between consecutive text chunks. Adjusting this helps maintain context across chunks, which is crucial for accuracy in retrieval-augmented generation systems.",
297 "default": 0
298 }
299 }
300 },
301 "runsResponseSchema": {
302 "type": "object",
303 "properties": {
304 "data": {
305 "type": "object",
306 "properties": {
307 "id": {
308 "type": "string"
309 },
310 "actId": {
311 "type": "string"
312 },
313 "userId": {
314 "type": "string"
315 },
316 "startedAt": {
317 "type": "string",
318 "format": "date-time",
319 "example": "2025-01-08T00:00:00.000Z"
320 },
321 "finishedAt": {
322 "type": "string",
323 "format": "date-time",
324 "example": "2025-01-08T00:00:00.000Z"
325 },
326 "status": {
327 "type": "string",
328 "example": "READY"
329 },
330 "meta": {
331 "type": "object",
332 "properties": {
333 "origin": {
334 "type": "string",
335 "example": "API"
336 },
337 "userAgent": {
338 "type": "string"
339 }
340 }
341 },
342 "stats": {
343 "type": "object",
344 "properties": {
345 "inputBodyLen": {
346 "type": "integer",
347 "example": 2000
348 },
349 "rebootCount": {
350 "type": "integer",
351 "example": 0
352 },
353 "restartCount": {
354 "type": "integer",
355 "example": 0
356 },
357 "resurrectCount": {
358 "type": "integer",
359 "example": 0
360 },
361 "computeUnits": {
362 "type": "integer",
363 "example": 0
364 }
365 }
366 },
367 "options": {
368 "type": "object",
369 "properties": {
370 "build": {
371 "type": "string",
372 "example": "latest"
373 },
374 "timeoutSecs": {
375 "type": "integer",
376 "example": 300
377 },
378 "memoryMbytes": {
379 "type": "integer",
380 "example": 1024
381 },
382 "diskMbytes": {
383 "type": "integer",
384 "example": 2048
385 }
386 }
387 },
388 "buildId": {
389 "type": "string"
390 },
391 "defaultKeyValueStoreId": {
392 "type": "string"
393 },
394 "defaultDatasetId": {
395 "type": "string"
396 },
397 "defaultRequestQueueId": {
398 "type": "string"
399 },
400 "buildNumber": {
401 "type": "string",
402 "example": "1.0.0"
403 },
404 "containerUrl": {
405 "type": "string"
406 },
407 "usage": {
408 "type": "object",
409 "properties": {
410 "ACTOR_COMPUTE_UNITS": {
411 "type": "integer",
412 "example": 0
413 },
414 "DATASET_READS": {
415 "type": "integer",
416 "example": 0
417 },
418 "DATASET_WRITES": {
419 "type": "integer",
420 "example": 0
421 },
422 "KEY_VALUE_STORE_READS": {
423 "type": "integer",
424 "example": 0
425 },
426 "KEY_VALUE_STORE_WRITES": {
427 "type": "integer",
428 "example": 1
429 },
430 "KEY_VALUE_STORE_LISTS": {
431 "type": "integer",
432 "example": 0
433 },
434 "REQUEST_QUEUE_READS": {
435 "type": "integer",
436 "example": 0
437 },
438 "REQUEST_QUEUE_WRITES": {
439 "type": "integer",
440 "example": 0
441 },
442 "DATA_TRANSFER_INTERNAL_GBYTES": {
443 "type": "integer",
444 "example": 0
445 },
446 "DATA_TRANSFER_EXTERNAL_GBYTES": {
447 "type": "integer",
448 "example": 0
449 },
450 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
451 "type": "integer",
452 "example": 0
453 },
454 "PROXY_SERPS": {
455 "type": "integer",
456 "example": 0
457 }
458 }
459 },
460 "usageTotalUsd": {
461 "type": "number",
462 "example": 0.00005
463 },
464 "usageUsd": {
465 "type": "object",
466 "properties": {
467 "ACTOR_COMPUTE_UNITS": {
468 "type": "integer",
469 "example": 0
470 },
471 "DATASET_READS": {
472 "type": "integer",
473 "example": 0
474 },
475 "DATASET_WRITES": {
476 "type": "integer",
477 "example": 0
478 },
479 "KEY_VALUE_STORE_READS": {
480 "type": "integer",
481 "example": 0
482 },
483 "KEY_VALUE_STORE_WRITES": {
484 "type": "number",
485 "example": 0.00005
486 },
487 "KEY_VALUE_STORE_LISTS": {
488 "type": "integer",
489 "example": 0
490 },
491 "REQUEST_QUEUE_READS": {
492 "type": "integer",
493 "example": 0
494 },
495 "REQUEST_QUEUE_WRITES": {
496 "type": "integer",
497 "example": 0
498 },
499 "DATA_TRANSFER_INTERNAL_GBYTES": {
500 "type": "integer",
501 "example": 0
502 },
503 "DATA_TRANSFER_EXTERNAL_GBYTES": {
504 "type": "integer",
505 "example": 0
506 },
507 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
508 "type": "integer",
509 "example": 0
510 },
511 "PROXY_SERPS": {
512 "type": "integer",
513 "example": 0
514 }
515 }
516 }
517 }
518 }
519 }
520 }
521 }
522 }
523}
OpenSearch Integration OpenAPI definition
OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for OpenSearch Integration from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients:
Actor Metrics
3 monthly users
-
3 bookmarks
Created in Oct 2024
Modified a month ago