### Initialize Job Request Example Source: https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/initialize-job This example demonstrates how to send a POST request to the /catchAll/initialize endpoint with a query and context. Use this to get suggested validators and enrichments for your search. ```json { "query": "Series B funding rounds for SaaS startups", "context": "Focus on funding amount and company name" } ``` -------------------------------- ### Install CatchAll SDK with yarn Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/typescript Install the newscatcher-catchall-sdk package using yarn. ```bash yarn add newscatcher-catchall-sdk ``` -------------------------------- ### Install from GitHub for Development Source: https://www.newscatcherapi.com/docs/web-search-api/integrations/langchain Clone the langchain-catchall repository from GitHub and install it locally for development purposes. ```bash git clone https://github.com/NewscatcherAPI/langchain-catchall.git cd langchain-catchall pip install -e . pip install langchain-core ``` -------------------------------- ### Install CatchAll SDK with pnpm Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/typescript Install the newscatcher-catchall-sdk package using pnpm. ```bash pnpm add newscatcher-catchall-sdk ``` -------------------------------- ### Install CatchAll SDK Source: https://www.newscatcherapi.com/docs/web-search-api/how-to/build-an-event-feed Install the CatchAll SDK for your preferred language. This is an optional step before using the API. ```bash # cURL is included on most systems. Check with: curl --version ``` ```python pip install newscatcher-catchall-sdk ``` ```typescript npm install newscatcher-catchall-sdk ``` ```java // build.gradle dependencies { implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.0' } ``` -------------------------------- ### Install CatchAll Requirements Source: https://www.newscatcherapi.com/docs/web-search-api/integrations/claude Installs necessary dependencies for using CatchAll. Ensure you have a requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install langchain-catchall and langchain-core Source: https://www.newscatcherapi.com/docs/web-search-api/integrations/langchain Install the necessary Python packages for CatchAll and LangChain integration using pip. ```bash pip install langchain-catchall langchain-core ``` -------------------------------- ### Install NewsCatcher SDK Source: https://www.newscatcherapi.com/docs/news-api/libraries/typescript Install the NewsCatcher SDK using npm, yarn, or pnpm. ```bash # npm npm install newscatcher-sdk # yarn yarn add newscatcher-sdk # pnpm pnpm add newscatcher-sdk ``` -------------------------------- ### Install Python SDK using Pipenv Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/python Install the newscatcher-catchall-sdk package using Pipenv. ```bash pipenv install newscatcher-catchall-sdk ``` -------------------------------- ### Install Python SDK Source: https://www.newscatcherapi.com/docs/news-api/libraries/python Install the News API Python client library using pip. ```bash pip install newscatcher-sdk ``` -------------------------------- ### Get Plan Limits API Response Example Source: https://www.newscatcherapi.com/docs/web-search-api/api-reference/meta/get-plan-limits This is an example of the JSON response returned by the getPlanLimits operation. It details various plan features, their limits, and current usage. ```json { "features": [ { "name": "Jobs Concurrency", "code": "Jobs_Concurrency", "value_type": "integer", "value": 20, "current_usage": 1 }, { "name": "Max Results", "code": "Job_Max_Results", "value_type": "integer", "value": 100000, "current_usage": 0 }, { "name": "Monthly Granted Credits", "code": "monthly_free_credits", "value_type": "integer", "value": 200000, "current_usage": 0 } ] } ``` -------------------------------- ### Get Job Results with Java Source: https://www.newscatcherapi.com/docs/web-search-api/concepts/jobs Utilize the Java client to obtain job results. The example shows how to get results once a job is finished, or how to continuously check the job status and results during the 'enriching' phase. ```java // Pull after completion var results = client.jobs().getJobResults(jobId); System.out.println("Found " + results.getValidRecords() + " valid records"); // Or pull during enriching for early access while (true) { var status = client.jobs().getJobStatus(jobId); if (PublicJobStatus.ENRICHING.equals(status.getStatus().orElse(null)) || PublicJobStatus.COMPLETED.equals(status.getStatus().orElse(null))) { var results = client.jobs().getJobResults(jobId); System.out.println("Progress: " + results.getProgressValidated() + "/" + results.getCandidateRecords() + " validated, " + results.getValidRecords() + " valid"); if (PublicJobStatus.COMPLETED.equals(status.getStatus().orElse(null))) break; } Thread.sleep(POLL_INTERVAL_MS); } ``` -------------------------------- ### Quickstart CatchAll Search with LangChain Source: https://www.newscatcherapi.com/docs/web-search-api/integrations/langchain Initialize the CatchAll client and perform a search query using LangChain. The search method handles job submission, polling, and retrieval automatically. ```python import os from langchain_catchall import CatchAllClient client = CatchAllClient(api_key=os.environ["CATCHALL_API_KEY"]) result = client.search("Semiconductor company earnings announcements") print(f"Found {result.valid_records} records") for record in result.all_records[:3]: print(f"- {record.record_title}") ``` -------------------------------- ### Invalid Patterns: Wildcards Source: https://www.newscatcherapi.com/docs/news-api/how-to/validate-queries-python-sdk Examples of incorrect wildcard usage, including starting with a wildcard, spaces before wildcards, and multiple wildcards. ```python "*machine" # Cannot start with wildcard "term *" # Space before wildcard "**" # Multiple wildcards "***technology" # Multiple wildcards ``` -------------------------------- ### Complete Monitor Example in Java Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/java This comprehensive example demonstrates the full lifecycle of a monitor, including creation, updating webhooks, listing all monitors, controlling execution (enable/disable), listing job history, and pulling aggregated results. It requires your API key and pre-existing webhook and job IDs. ```java import com.newscatcher.catchall.CatchAllApi; import com.newscatcher.catchall.resources.monitors.requests.CreateMonitorRequestDto; import com.newscatcher.catchall.resources.monitors.requests.UpdateMonitorRequestDto; import com.newscatcher.catchall.resources.monitors.requests.ListMonitorJobsRequest; import com.newscatcher.catchall.resources.monitors.types.ListMonitorJobsResponse; import com.newscatcher.catchall.types.CreateMonitorResponseDto; import com.newscatcher.catchall.types.UpdateMonitorResponseDto; import com.newscatcher.catchall.types.ListMonitorsResponseDto; import com.newscatcher.catchall.types.PullMonitorResponseDto; import com.newscatcher.catchall.types.WebhookDto; import com.newscatcher.catchall.types.WebhookDtoMethod; import com.newscatcher.catchall.core.NewscatcherApiApiException; import java.util.Map; public class MonitorExample { public static void main(String[] args) { CatchAllApi client = CatchAllApi.builder() .apiKey("YOUR_API_KEY") .build(); try { // Create monitor from completed job String jobId = "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"; CreateMonitorResponseDto monitor = client.monitors().createMonitor( CreateMonitorRequestDto.builder() .referenceJobId(jobId) .schedule("every day at 12 PM UTC") .webhookIds(List.of("a1b2c3d4-e5f6-7890-abcd-ef1234567890")) .build() ); String monitorId = monitor.getMonitorId().orElseThrow(); System.out.println("Monitor created: " + monitorId); // Update webhook client.monitors().updateMonitor( monitorId, UpdateMonitorRequestDto.builder() .webhookIds(List.of("b2c3d4e5-f6a7-8901-bcde-f12345678901")) .limit(100) .build() ); // List all monitors ListMonitorsResponseDto allMonitors = client.monitors().listMonitors(); allMonitors.getMonitors().forEach(m -> { String status = m.getEnabled() ? "active" : "paused"; System.out.println(String.format("%s: %s", m.getMonitorId(), status)); }); // Control execution client.monitors().disableMonitor(monitorId); client.monitors().enableMonitor(monitorId); // List execution history ListMonitorJobsResponse jobs = client.monitors().listMonitorJobs( monitorId, ListMonitorJobsRequest.builder().sort("desc").build() ); System.out.println("\nMonitor executed " + jobs.getTotalJobs() + " jobs"); jobs.getJobs().forEach(job -> { System.out.println(String.format( " Job %s: %s to %s", job.getJobId(), job.getStartDate(), job.getEndDate() )); }); // Get aggregated results PullMonitorResponseDto results = client.monitors().pullMonitorResults(monitorId); System.out.println("\nCollected " + results.getRecords().orElse(0) + " total records"); results.getAllRecords().ifPresent(records -> records.forEach(record -> System.out.println(" " + record.getRecordTitle())) ); } catch (NewscatcherApiApiException e) { System.err.println("Status: " + e.statusCode()); System.err.println("Error: " + e.body()); } } } ``` -------------------------------- ### Search articles in English (GET) Source: https://www.newscatcherapi.com/docs/news-api/api-reference/enumerated-parameters Use the `lang` parameter with a two-letter ISO 639-1 code to filter articles by language. This example searches for English articles. ```bash GET requests: * To search for articles in English: `lang=en` ``` -------------------------------- ### Complete Monitor Example Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/python A comprehensive example demonstrating the creation, updating, listing, control, and result retrieval of monitors, including error handling. ```python from newscatcher_catchall import CatchAllApi from newscatcher_catchall.core.api_error import ApiError client = CatchAllApi(api_key="YOUR_API_KEY") try: # Create monitor from completed job job_id = "af7a26d6-cf0b-458c-a6ed-4b6318c74da3" monitor = client.monitors.create_monitor( reference_job_id=job_id, schedule="every day at 12 PM UTC", webhook_ids=["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], ) monitor_id = monitor.monitor_id print(f"Monitor created: {monitor_id}") # Update webhook client.monitors.update_monitor( monitor_id=monitor_id, webhook_ids=["b2c3d4e5-f6a7-8901-bcde-f12345678901"], limit=100, ) # List all monitors all_monitors = client.monitors.list_monitors() for m in all_monitors.monitors: status = "active" if m.enabled else "paused" print(f"{m.monitor_id}: {status}") # Control execution client.monitors.disable_monitor(monitor_id) client.monitors.enable_monitor(monitor_id) # List execution history jobs = client.monitors.list_monitor_jobs( monitor_id=monitor_id, sort="desc", ) print(f"\nMonitor executed {jobs.total_jobs} jobs") for job in jobs.jobs: print(f" Job {job.job_id}: {job.start_date} to {job.end_date}") # Get aggregated results results = client.monitors.pull_monitor_results(monitor_id) print(f"\nCollected {results.records} total records") for record in results.all_records: print(f" {record.record_title}") print(f" Added: {record.added_on}") except ApiError as e: print(f"Status: {e.status_code}") print(f"Error: {e.body}") ``` -------------------------------- ### Scheduled Event Additional Information Source: https://www.newscatcherapi.com/docs/web-search-api/api-reference/monitors/get-monitor-status-history Example of the additional information structure for a 'scheduled' monitor event, including job ID, start date, and end date. ```json { "job_id": "c3d4e5f6-a7b8-9012-cdef-345678901234", "start_date": "2026-02-04T12:00:00", "end_date": "2026-02-05T12:00:00" } ``` -------------------------------- ### Install CatchAll Python SDK Source: https://www.newscatcherapi.com/docs/web-search-api/get-started/quickstart Install the Python client library for the CatchAll API using pip. ```bash pip install newscatcher-catchall-sdk ``` -------------------------------- ### Search for tech news (GET) Source: https://www.newscatcherapi.com/docs/news-api/api-reference/enumerated-parameters Use the `news_type` parameter to filter results by the type of news source. This example searches for articles categorized as 'Tech News and Updates'. ```bash GET requests: * To search for tech news: `news_type=Tech News and Updates` ``` -------------------------------- ### Exclude articles in French (GET) Source: https://www.newscatcherapi.com/docs/news-api/api-reference/enumerated-parameters Use the `not_lang` parameter with a two-letter ISO 639-1 code to exclude articles in a specific language. This example excludes French articles. ```bash * To exclude articles in French: `not_lang=fr` ``` -------------------------------- ### Create Company Entity with TypeScript SDK Source: https://www.newscatcherapi.com/docs/web-search-api/concepts/company-search This TypeScript example demonstrates creating a company entity using the NewsCatcher CatchAll SDK. It requires an API key and the SDK to be installed. ```typescript import { CatchAllApiClient } from "newscatcher-catchall-sdk"; const client = new CatchAllApiClient({ apiKey: "YOUR_API_KEY" }); const entity = await client.entities.createEntity({ name: "NewsCatcher", entity_type: "company", description: "NewsCatcher is a data-as-a-service company headquartered in Middletown, Delaware, USA, founded in 2021, providing news intelligence APIs including the CatchAll Web Search API (2B+ web pages indexed) and News API (140,000+ sources, 100+ countries).", additional_attributes: { company_attributes: { domain: "newscatcherapi.com", alternative_names: ["NewsCatcher CatchAll", "NewsCatcher API"], key_persons: ["Artem Bugara", "Maksym Sugonyaka"], }, }, }); const entityId = entity.id; ``` -------------------------------- ### Complete Job Example with All Features Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/python A comprehensive example demonstrating job creation with custom enrichments, polling for status and results, handling early results, continuing a job, and displaying final results. Includes error handling for API calls. ```python from newscatcher_catchall import CatchAllApi from newscatcher_catchall.core.api_error import ApiError import time POLL_INTERVAL_SECONDS = 60 client = CatchAllApi(api_key="YOUR_API_KEY") try: # Create job with custom enrichments job = client.jobs.create_job( query="AI company acquisitions", context="Focus on deal size and acquiring company details", limit=10, enrichments=[ { "name": "acquirer_company", "description": "Extract the acquiring company name", "type": "company" }, { "name": "deal_value", "description": "Extract acquisition price if mentioned", "type": "number" } ] ) job_id = job.job_id print(f"Job created: {job_id}") # Poll with early results access while True: status = client.jobs.get_job_status(job_id) if status.status in ["enriching", "completed"]: results = client.jobs.get_job_results(job_id) if results.valid_records is not None: print(f"Progress: {results.valid_records} valid records") if status.status == "completed": break time.sleep(POLL_INTERVAL_SECONDS) # Continue if needed if results.valid_records >= 10: client.jobs.continue_job(job_id=job_id, new_limit=50) while True: status = client.jobs.get_job_status(job_id) if status.status == "completed": break time.sleep(POLL_INTERVAL_SECONDS) results = client.jobs.get_job_results(job_id) # Display results print(f"\nFinal: {results.valid_records} valid records") for record in results.all_records: print(f" {record.record_title}") except ApiError as e: print(f"Status: {e.status_code}") print(f"Error: {e.body}") ``` -------------------------------- ### Get Job Status Response Example Source: https://www.newscatcherapi.com/docs/web-search-api/concepts/jobs This JSON object represents the response from the job status endpoint, showing the job ID, current status, and a list of processing steps with their individual statuses. ```json { "job_id": "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c", "status": "completed", "steps": [ { "status": "submitted", "order": 1, "completed": true }, { "status": "analyzing", "order": 2, "completed": true }, { "status": "fetching", "order": 3, "completed": true }, { "status": "clustering", "order": 4, "completed": true }, { "status": "enriching", "order": 5, "completed": true }, { "status": "completed", "order": 6, "completed": true }, { "status": "failed", "order": 7, "completed": false } ] } ``` -------------------------------- ### Exclude articles from Canada (GET) Source: https://www.newscatcherapi.com/docs/news-api/api-reference/enumerated-parameters Use the `not_country` parameter with a two-letter ISO 3166-1 alpha-2 country code to exclude articles originating from a specific country. This example excludes articles from Canada. ```bash * To exclude articles from Canada: `not_country=CA` ``` -------------------------------- ### Install CatchAll TypeScript SDK Source: https://www.newscatcherapi.com/docs/web-search-api/get-started/quickstart Install the TypeScript client library for the CatchAll API using npm. ```bash npm install newscatcher-catchall-sdk ``` -------------------------------- ### Search articles from the United States (GET) Source: https://www.newscatcherapi.com/docs/news-api/api-reference/enumerated-parameters Use the `country` parameter with a two-letter ISO 3166-1 alpha-2 country code to filter articles by their country of origin. This example searches for articles from the US. ```bash GET requests: * To search for articles from the United States: `country=US` ``` -------------------------------- ### Get Job Results Response Example Source: https://www.newscatcherapi.com/docs/web-search-api/concepts/jobs This JSON object represents a typical response when retrieving job results. It includes details about the query, status, and the records found, along with enrichment data for companies. ```json { "job_id": "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c", "query": "Series B funding rounds for SaaS startups", "context": "Focus on funding amount and company name", "validators": [ "is_series_b_funding", "is_saas_startup" ], "enrichments": [ "enrichment_confidence", "funding_amount", "funding_currency", "funding_date", "investee_company", "investor_company", "valuation", "other_investors" ], "status": "completed", "duration": "1m", "candidate_records": 4, "valid_records": 3, "progress_validated": 4, "date_range": { "start_date": "2026-02-17T00:00:00Z", "end_date": "2026-02-24T00:00:00Z" }, "page": 1, "page_size": 2, "total_pages": 2, "all_records": [ { "record_id": "6983973854314692457", "record_title": "VulnCheck Raises $25M Series B Funding", "enrichment": { "enrichment_confidence": "high", "funding_amount": 25000000, "funding_currency": "USD", "funding_date": "2026-02-17", "investee_company": { "source_text": "VulnCheck", "confidence": 0.99, "metadata": { "name": "VulnCheck", "domain_url": "vulncheck.com", "domain_url_confidence": "high" } }, "investor_company": { "source_text": "Sorenson Capital", "confidence": 0.99, "metadata": { "name": "Sorenson Capital", "domain_url": null, "domain_url_confidence": null } }, "valuation": 25000000, "other_investors": "National Grid Partners, Ten Eleven Ventures, In-Q-Tel" }, "citations": [ { "title": "Exclusive: VulnCheck raises $25M funding to help companies patch software bugs", "link": "https://www.msn.com/en-us/money/other/exclusive-vulncheck-raises-25m-funding-to-help-companies-patch-software-bugs/ar-AA1WwdjW", "published_date": "2026-02-17T14:01:05Z" }, { "title": "VulnCheck lands $25m to expand threat intelligence", "link": "https://fintech.global/2026/02/18/vulncheck-lands-25m-to-expand-threat-intelligence", "published_date": "2026-02-18T10:34:27Z" } ] } ] } ``` -------------------------------- ### Initialize CatchAllTools Toolkit Source: https://www.newscatcherapi.com/docs/web-search-api/integrations/langchain Initialize the CatchAllTools toolkit with API key, LLM, and configuration options. This setup is required before using the tools with Langchain agents. ```python import os from langchain_openai import ChatOpenAI from langchain_catchall import CatchAllTools toolkit = CatchAllTools( api_key=os.environ["CATCHALL_API_KEY"], llm=ChatOpenAI(model="gpt-4o"), limit=100, # Default result limit verbose=True, # Show progress initialize_query=True, # Auto-suggest validators/enrichments ) tools = toolkit.get_tools() ``` -------------------------------- ### Get Webhook Delivery History (Java) Source: https://www.newscatcherapi.com/docs/web-search-api/how-to/set-up-webhooks Fetch and display webhook delivery history for a monitor using the Java client. This example iterates through the delivery history items and prints their timestamp, status, and code. ```java var history = client.webhooks().getWebhookDeliveryHistory( MappableResourceType.MONITOR, "3fec5b07-8786-46d7-9486-d43ff67eccd4" ); for (var item : history.getItems()) { System.out.println(item.getTimestamp() + " — " + item.getDeliveryStatus() + " (" + item.getStatusCode() + ")"); } ``` -------------------------------- ### Complete Monitor Management Example Source: https://www.newscatcherapi.com/docs/web-search-api/libraries/typescript A comprehensive example demonstrating the creation, updating, listing, control, and result retrieval of monitors using the NewsCatcher API SDK. ```typescript import { CatchAllApiClient, CatchAllApiError } from "newscatcher-catchall-sdk"; const client = new CatchAllApiClient({ apiKey: "YOUR_API_KEY" }); try { // Create monitor from completed job const jobId = "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"; const monitor = await client.monitors.createMonitor({ reference_job_id: jobId, schedule: "every day at 12 PM UTC", webhook_ids: ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], }); const monitorId = monitor.monitor_id; console.log(`Monitor created: ${monitorId}`); // Update webhook await client.monitors.updateMonitor({ monitor_id: monitorId, webhook_ids: ["b2c3d4e5-f6a7-8901-bcde-f12345678901"], limit: 100, }); // List all monitors const allMonitors = await client.monitors.listMonitors(); for (const m of allMonitors.monitors) { const status = m.enabled ? "active" : "paused"; console.log(`${m.monitor_id}: ${status}`); } // Control execution await client.monitors.disableMonitor({ monitor_id: monitorId }); await client.monitors.enableMonitor({ monitor_id: monitorId }); // List execution history const jobs = await client.monitors.listMonitorJobs({ monitor_id: monitorId, sort: "desc", }); console.log(`\nMonitor executed ${jobs.total_jobs} jobs`); for (const job of jobs.jobs) { console.log(` Job ${job.job_id}: ${job.start_date} to ${job.end_date}`); } // Get aggregated results const results = await client.monitors.pullMonitorResults({ monitor_id: monitorId, }); console.log(`\nCollected ${results.records} total records`); for (const record of results.all_records) { console.log(` ${record.record_title}`); } } catch (err) { if (err instanceof CatchAllApiError) { console.error(`Status: ${err.statusCode}`); console.error(`Error: ${err.message}`); } } ``` -------------------------------- ### Get Project Overview Source: https://www.newscatcherapi.com/docs/llms.txt Returns resource counts for a project, grouped by type and status. For `jobs` and `monitors`, counts are broken down by status (for example, `completed`, `failed`). For `datasets` and `monitor_groups`, only a `total` count is returned. ```APIDOC ## GET /projects/get-project-overview ### Description Returns resource counts for a project, grouped by type and status. For `jobs` and `monitors`, counts are broken down by status (for example, `completed`, `failed`). For `datasets` and `monitor_groups`, only a `total` count is returned. ### Method GET ### Endpoint /projects/get-project-overview ### Parameters #### Query Parameters - **project_id** (string) - Required - The ID of the project to get the overview for. ``` -------------------------------- ### Get Webhook Delivery History (Python) Source: https://www.newscatcherapi.com/docs/web-search-api/how-to/set-up-webhooks Fetch and print webhook delivery history for a monitor using the Python client. This example iterates through the history items and prints their timestamp, delivery status, and status code. ```python history = client.webhooks.get_webhook_delivery_history( resource_type="monitor", resource_id="3fec5b07-8786-46d7-9486-d43ff67eccd4", ) for item in history.items: print(f"{item.timestamp} — {item.delivery_status} ({item.status_code})") ``` -------------------------------- ### Create Monitor Request Example Source: https://www.newscatcherapi.com/docs/web-search-api/api-reference/monitors/create-monitor This example demonstrates the structure of a request body to create a monitor. It includes a reference job ID, schedule, timezone, backfill option, and webhook IDs. ```json { "reference_job_id": "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c", "schedule": "every day at 12 PM", "timezone": "UTC", "backfill": true, "limit": 10, "webhook_ids": [ "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ] } ``` -------------------------------- ### Filter Articles by Custom Tags using cURL Source: https://www.newscatcherapi.com/docs/news-api/guides-and-concepts/custom-tags Use the `custom_tags` parameter with a comma-separated string for GET requests or an array of strings for POST requests to filter articles by your taxonomy tags. This example demonstrates a POST request. ```bash curl -X POST "https://v3-api.newscatcherapi.com/api/search" \ -H "x-api-token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "q": "*", "custom_tags.my_taxonomy": ["Tag1", "Tag2", "Tag3"] }' ``` -------------------------------- ### Search for AI articles mentioning OpenAI or Microsoft using TypeScript SDK Source: https://www.newscatcherapi.com/docs/news-api/how-to/search-by-entity This TypeScript example shows how to find articles on 'artificial intelligence' that mention 'OpenAI' or 'Microsoft' using the newscatcher-sdk. Ensure the SDK is installed and your API key is configured. ```typescript import { NewscatcherApiClient } from "newscatcher-sdk"; const client = new NewscatcherApiClient({ apiKey: "YOUR_API_KEY" }); const response = await client.search.post({ q: '"artificial intelligence"', orgEntityName: "OpenAI OR Microsoft", includeNlpData: true, lang: "en", }); response.articles?.forEach((article) => console.log(article.title)); ```