{
	"info": {
		"_postman_id": "25d9b9c1-757e-439d-917d-89f37c1e7355",
		"name": "Examples - Search API",
		"description": "This section provides a few ready-made examples to help you get started with the Opoint Search API quickly. Each example shows a different way to structure your search query using curl. These examples use POST requests with JSON bodies — the standard way to interact with our Search API.\n\nJust replace yourtoken with your actual API token",
		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
		"_exporter_id": "41519651",
		"_collection_link": "https://opointsupport.postman.co/workspace/Team-Workspace~a6ccd254-ceed-4efa-80df-eb2526a8758e/collection/41519651-25d9b9c1-757e-439d-917d-89f37c1e7355?action=share&source=collection_link&creator=41519651"
	},
	"item": [
		{
			"name": "Quick Start Examples",
			"item": [
				{
					"name": "Basic search",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "//Search for articles containing the keyword \"spotify\" anywhere in the article (header, summary, body). \r\n//Return up to 10 articles, including the header, summary, and body. You can customize the results using the params object.\r\n\r\n{\r\n\"searchterm\": \"spotify\",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				},
				{
					"name": "Search in a specific section",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "// Limit the search to just the header of articles. It's useful when you want to find articles that mention a term prominently in the title, rather than buried in the text. \r\n\r\n{\r\n\"searchterm\": \"header:spotify\",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				},
				{
					"name": "Search with a Boolean expression",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "//Find articles where both “spotify” and “football” appear, anywhere in the article. You can also use OR, ANDNOT or – operators.\r\n\r\n{\r\n\"searchterm\": \"spotify AND football\",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				},
				{
					"name": "Search in frequency",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "//Find articles where “spotify” appears at least three times in the full content and also appears in the header. Great for focusing on content with higher relevance.\r\n\r\n{\r\n\"searchterm\": \"spotify[3..] AND header:spotify\",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				},
				{
					"name": "Search in language",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "//Same as the above (search in frequency), but now limited to English-language articles. \r\n//lang:en is one of many filters you can use — others include geo, etc.\r\n\r\n{\r\n\"searchterm\": \"spotify[3..] AND header:spotify AND lang:en\",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				},
				{
					"name": "Search in proximity",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Token yourtoken",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "//Return articles where “spotify” and “football” appear within five words of each other. This is perfect for identifying closely related mentions in the same context.\r\n\r\n{\r\n\"searchterm\": \" SPAN/5(spotify, football) \",\r\n\"params\": {\r\n    \"requestedarticles\": 10,\r\n    \"main\": {\r\n        \"header\": 1,\r\n        \"summary\": 1,\r\n        \"text\": 1\r\n        }\r\n    }\r\n}\r\n",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "https://api.opoint.com/search/"
					},
					"response": []
				}
			],
			"description": "| **Search Endpoint** | Search components |\n| --- | --- |\n| [https://api.opoint.com/search/](https://api.opoint.com/search/) | \\-Search String  <br>\\-Parameters |\n\nFind more details here: [Search request | Opoint](https://api-docs.opoint.com/references/search-request)"
		}
	]
}