# Competitive Intelligence Agent (`apify/competitive-intelligence-agent`) Actor

An AI-powered competitive intelligence tool that extracts and analyzes data from Google Maps and social media to uncover competitor strengths, customer sentiment, and market gaps.

- **URL**: https://apify.com/apify/competitive-intelligence-agent.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Agents, AI
- **Stats:** 226 total users, 2 monthly users, 100.0% runs succeeded, 31 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.00 / 1,000 single competitor ai analyses

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🏆 Competitive Intelligence AI Agent

**Competitive Intelligence Agent** is an AI-powered market intelligence tool powered by **Google Maps Scraper**. It scrapes information about businesses and generates data on them.

🔍 Analyze competitors by location and industry
💬 Extract customer sentiment through review analysis
💲 Gather details on pricing and future promotions from listings
🎯 Identify market gaps and strategic opportunities

### 📍 What data can Competitive Intelligence Agent analyze?

🏢 Business rankings
⭐ Rating comparisons
📝 Review sentiment analysis
💰 Pricing level indicators
🏷️ Service categories
📍 Location analysis
🕐 Operating hours analysis
🌐 Social media presence assessment
📞 Contact availability
🎖️ Key differentiators
👥 Customer loyalty indicators
🏆 Competitive advantages

### **⬇️ Input**

To get the best results, please provide **clear and specific input data**. This helps the agent retrieve relevant, high-quality information for your use case.

#### **✅ Recommended search inputs**

To scrape, you need to provide one of the following:

1. **Search term + location**

   Use descriptive phrases combining **industry, business type, and location**. Examples:

   - "vegan restaurants"
   - "coworking spaces"
   - "dental clinics"

   Add the location based on your preferences. Simpler formats work best; e.g., use city + country rather than city + country + state.

2. **Google Maps URL**

   Use a direct link to a Google Maps search or place (supports custom searches). We recommend using this option for more accurate results.

   - Example: https://www.google.com/maps/search/vegan+restaurants+in+Berlin/

3. **Google Place ID**

   You can also provide a unique Google Place ID (either single or in bulk) for more precise analysis.

#### **📊 Data volume guidelines**

To ensure an accurate analysis and to prevent overload (and long processing times), we recommend:

- **Number of businesses**: 15–30 competitors for a comprehensive view of the market.
- **Number of reviews per business**: By default, Competitive Intelligence Agent will gather 100 reviews.

```json
{
    "searchStringsArray": ["hair salons in Berlin", "beauty salons Berlin"],
    "maxCrawledPlacesPerSearch": 20,
    "includeReviews": true,
    "language": "en",
    "scrapeReviewerName": false,
    "scrapeReviewDate": true
}
```

### ⬆️ Output

The **Competitive Intelligence Agent** delivers structured output designed to help you understand your competitive landscape.

#### 🧠 Main output: comparative intelligence report

After processing your input, the agent returns a **JSON report** with insights across six key areas:

**1. Competitors analyzed**

- Full list of all identified businesses in the selected market and area.
- Typically includes 15–50 businesses, depending on density and filter settings.

**2. Overall ranking**

- Competitors are ranked based on overall market strength.
- Strength is determined by customer sentiment, service quality, and digital presence.

**3. Comparative aspect analysis**

- Detailed side-by-side comparison across different aspects:
  - Customer sentiment and reviews
  - Digital and social media presence
  - Operational/service consistency
  - Accessibility and family-friendliness
- For each aspect, you get:
  - Top and weaker performers
  - Short AI-written comparative notes explaining the outcome

**4. Competitor differentiators matrix**

- Each key competitor is evaluated for:
  - Positive differentiators (e.g., “exceptional food quality,” “strong Instagram presence”)
  - Negative differentiators (e.g., “cash-only,” “inconsistent service”)

**5. Strategic market overview**

- Executive-level summary of market trends, including:
  - **Main competitive battlegrounds** (what competitors are fighting over)
  - **Market opportunities** (gaps that new businesses can fill)
  - **Emerging threats** (risks businesses face from digital trends, reputation, etc.)
  - **AI-generated narrative** explaining how the market behaves and where it’s heading

**6. Metadata analysis**

- Timestamp for when the analysis was generated.
- Title contextualizing the scope of the report, helping users navigate the key-value store where each analyzed location is represented on an interactive map linked to detailed competitor insights.

#### 🗺️ Map view

After each successful run, you can also opt to see all the scraped locations in an interactive map view. Each location can be clicked, giving you a detailed view of all data associated with it. It is stored in the **Key-Value Store** as `results-map.html` record.

#### 📁 Accessing raw data

The following **raw datasets** are also available directly in your Apify runs tab:

- **Google Maps Scraper data**: Business listings, categories, ratings, price levels, contact info, social media profiles, and up to 100 customer reviews per business

You can also access all output data through the following tabs:

- **Dataset tab**: for structured competitor data
- **Key-value store**: for the final AI report in JSON
- **Run log**: for process traceability

<img src="https://i.imgur.com/XgNTbqX.png" />

Output example:

```json
[
    {
        "comparisonAnalysisTitle": "Competitive Landscape Analysis of Bronx-Based Casual Dining and Specialty Restaurants",
        "competitorsAnalyzed": [
            "Halalbee's",
            "Step In",
            "La Fondita",
            "Parrilla Azteca Cibaeña Restaurant",
            "Sugar Restaurant"
        ],
        "analysisTimestamp": "2025-06-09T09:45:28.405Z",
        "overallRanking": [
            {
                "competitorName": "Halalbee's",
                "rank": "1st",
                "justification": "Halalbee's leads due to its strong local reputation with a high Google Maps rating of 4.7 stars from 461 reviews, consistently praised for fresh, high-quality halal burgers, unique menu items like truffle fries and specialty milkshakes, and excellent customer service. Its family-friendly, clean, and accessible atmosphere appeals to a broad demographic including health-conscious and halal-seeking customers. Despite lacking social media presence, its premium positioning and multiple service options create a compelling competitive advantage."
            },
            {
                "competitorName": "Sugar Restaurant",
                "rank": "2nd",
                "justification": "Sugar Restaurant ranks second with a similarly high Google rating of 4.7 stars from a large volume of 1183 reviews, highlighting excellent service, a vibrant atmosphere with music and hookah, and a strong cocktail program. It appeals to young adults, groups, and families with accessibility and multiple service options. However, service inconsistencies, food quality concerns, and minimal social media presence limit its full potential."
            },
            {
                "competitorName": "Step In",
                "rank": "3rd",
                "justification": "Step In holds a solid position with a 4.4-star rating from over 1,000 reviews, known for quality American comfort food, lively bar and DJ entertainment, and personalized service from named staff. Its family-friendly and accessible environment broadens appeal. Challenges include inconsistent service, noise levels, parking difficulties, and lack of social media presence, which constrain digital engagement and brand storytelling."
            },
            {
                "competitorName": "Parrilla Azteca Cibaeña Restaurant",
                "rank": "4th",
                "justification": "Parrilla Azteca Cibaeña is a well-regarded Nuevo Latino restaurant with a 4.4-star rating from 537 reviews, praised for excellent service, lively atmosphere with live music and DJ, and diverse offerings including hookah and cocktails. Its extended hours and family-friendly environment are strengths. However, inconsistent food quality, service pressure, loud music complaints, delivery issues, and no social media presence weaken its competitive stance."
            },
            {
                "competitorName": "La Fondita",
                "rank": "5th",
                "justification": "La Fondita is a respected authentic Mexican restaurant with a 4.6-star rating from 176 reviews, noted for authentic dishes, friendly service, and inclusive atmosphere. While it offers good value and owner responsiveness, it has the smallest review volume and faces challenges with occasional service and food inconsistencies, parking difficulties, and a complete absence of social media presence, limiting growth and broader market appeal."
            }
        ],
        "comparativeAspectAnalysis": [
            {
                "aspectName": "Customer Sentiment & Reputation",
                "topPerformers": ["Halalbee's", "Sugar Restaurant"],
                "weakerPerformers": ["Parrilla Azteca Cibaeña Restaurant", "La Fondita"],
                "comparativeNotes": "Halalbee's and Sugar Restaurant enjoy the highest overall Google Maps ratings (4.7 stars) with large volumes of positive reviews emphasizing food quality, service, and atmosphere. Step In also has strong sentiment but with noted service inconsistencies. Parrilla Azteca and La Fondita have positive but more mixed reviews, with issues around food quality consistency and service affecting customer satisfaction."
            },
            {
                "aspectName": "Service Quality & Customer Experience",
                "topPerformers": ["Halalbee's", "Sugar Restaurant"],
                "weakerPerformers": ["Parrilla Azteca Cibaeña Restaurant", "La Fondita"],
                "comparativeNotes": "Halalbee's and Sugar Restaurant are praised for attentive, friendly, and fast service, with individual staff recognition at Sugar enhancing loyalty. Step In has personalized service but occasional rude staff reports. Parrilla Azteca and La Fondita face challenges with inconsistent service, occasional rudeness, and order accuracy issues, impacting overall experience."
            },
            {
                "aspectName": "Menu & Unique Offerings",
                "topPerformers": ["Halalbee's", "Step In", "Parrilla Azteca Cibaeña Restaurant"],
                "weakerPerformers": ["La Fondita", "Sugar Restaurant"],
                "comparativeNotes": "Halalbee's stands out with halal-certified grass-fed beef burgers and specialty milkshakes. Step In offers a broad American comfort food menu with live entertainment. Parrilla Azteca combines Mexican-inspired cuisine with hookah and live music. La Fondita offers authentic Mexican dishes but with less menu diversity and Sugar focuses on BBQ and cocktails but has some food quality concerns."
            },
            {
                "aspectName": "Digital & Social Media Presence",
                "topPerformers": [],
                "weakerPerformers": ["All competitors"],
                "comparativeNotes": "None of the competitors have an active or meaningful social media presence. This is a universal weakness limiting digital engagement, brand storytelling, and reach to younger or broader audiences. Halalbee's, Step In, La Fondita, Parrilla Azteca, and Sugar all lack active profiles or content, representing a significant opportunity for differentiation."
            }
        ],
        "competitorDifferentiatorsMatrix": [
            {
                "competitorName": "Halalbee's",
                "keyPositiveDifferentiatorsInSet": [
                    "Premium halal-certified burgers with grass-fed beef and cage-free chicken",
                    "Popular specialty milkshakes and truffle fries as unique menu items",
                    "Strong local reputation with high customer service and family-friendly atmosphere"
                ],
                "keyNegativeDifferentiatorsInSet": [
                    "No social media presence limiting digital engagement",
                    "Price sensitivity especially on delivery platforms",
                    "Occasional service speed and food quality inconsistencies"
                ]
            },
            {
                "competitorName": "Step In",
                "keyPositiveDifferentiatorsInSet": [
                    "Long-standing local institution with nostalgic appeal",
                    "Combination of quality American comfort food and live DJ entertainment",
                    "Named staff enhancing personalized customer service"
                ],
                "keyNegativeDifferentiatorsInSet": [
                    "Inconsistent service and occasional rude staff",
                    "High noise levels detracting from some dining experiences",
                    "Limited vegetarian/vegan options"
                ]
            },
            {
                "competitorName": "La Fondita",
                "keyPositiveDifferentiatorsInSet": [
                    "Authentic Mexican cuisine with traditional and unique dishes",
                    "Inclusive, family-friendly, and LGBTQ+ welcoming atmosphere",
                    "Owner responsiveness to customer feedback"
                ],
                "keyNegativeDifferentiatorsInSet": [
                    "Smallest review volume and limited digital presence",
                    "Service inconsistencies and order accuracy issues",
                    "Parking difficulties and pricing transparency concerns"
                ]
            },
            {
                "competitorName": "Parrilla Azteca Cibaeña Restaurant",
                "keyPositiveDifferentiatorsInSet": [
                    "Lively Nuevo Latino dining with live music, DJ, and hookah",
                    "Extended hours including late nights and brunch",
                    "Family-friendly and LGBTQ+ inclusive environment"
                ],
                "keyNegativeDifferentiatorsInSet": [
                    "Inconsistent food quality and delivery service issues",
                    "Complaints about loud music and DJ favoritism",
                    "No social media presence limiting brand visibility"
                ]
            },
            {
                "competitorName": "Sugar Restaurant",
                "keyPositiveDifferentiatorsInSet": [
                    "Strong cocktail program with specialty drinks",
                    "Lively atmosphere with music and hookah appealing to young adults",
                    "Highly praised individual servers enhancing customer loyalty"
                ],
                "keyNegativeDifferentiatorsInSet": [
                    "Service inconsistency and food quality concerns",
                    "Automatic gratuity policy causing customer dissatisfaction",
                    "Minimal social media presence with inactive Instagram account"
                ]
            }
        ],
        "strategicMarketOverviewLLM": {
            "mainCompetitiveBattlegrounds": [
                "Food quality and unique menu differentiation",
                "Customer service excellence and personalized experiences",
                "Atmosphere and entertainment (live music, DJs, hookah)",
                "Digital engagement and social media presence",
                "Pricing transparency and value perception",
                "Accessibility and family-friendly environment"
            ],
            "identifiedMarketOpportunities": [
                "Establishing and activating social media channels to build brand awareness and engagement",
                "Enhancing service consistency and staff training to improve customer experience",
                "Expanding menu options to address gaps such as vegetarian/vegan offerings",
                "Improving pricing transparency especially on delivery platforms to reduce customer complaints",
                "Leveraging unique menu items and entertainment features in digital marketing",
                "Addressing parking and accessibility information to reduce customer friction"
            ],
            "identifiedMarketThreats": [
                "Competitors with stronger digital marketing could capture younger and broader audiences",
                "Inconsistent service and food quality risks damaging local reputations",
                "Price sensitivity and delivery platform markups may drive customers to competitors",
                "Negative ambiance factors such as loud music or poor atmosphere could deter repeat visits",
                "Health concerns related to hookah smoke exposure may alienate family customers"
            ],
            "overallSummary": "The competitive landscape in the Bronx casual dining and specialty restaurant segment is characterized by strong local reputations built on food quality, service, and atmosphere. Halalbee's and Sugar Restaurant lead with high customer satisfaction and unique offerings, while Step In and Parrilla Azteca provide lively entertainment and broad appeal. La Fondita offers authentic Mexican cuisine with a loyal following but smaller scale. A universal weakness across all competitors is the lack of active social media presence, limiting digital engagement and growth potential. Strategic focus on digital marketing, service consistency, and menu innovation will be critical to maintaining and expanding market share in this competitive environment."
        }
    }
]
```

### 💰 Pricing model

The Competitive Intelligence Agent is priced using the Apify pay-per-event (PPE) model. The price of an event is based on the number of competitors analyzed and the complexity of the resulting report.

- `AI: Single Competitor Analysis`: **P-single** (Charged for each of the `N` competitors analyzed individually). Includes:
  - Google Maps data (location, reviews, services, etc.)
  - Social media enrichment (platforms, followers, presence)
  - Individual sentiment and strength/weakness analysis
  - Overall competitor comparative analysis and competitor rankings list

**📌 Underlying actor costs (billed separately)**

The AI Agent runs supporting Apify Actors on your behalf. The cost of these Actors is **charged directly to your Apify account**:

- [Google Maps Scraper](https://apify.com/compass/crawler-google-places)
  Actor start, places scraped, categories used, review extraction, and social media profile enrichment

### 🛠️ Framework & technology

Built using **LangChain**, this agent benefits from:

- Structured workflows with large language models
- Chain-based logic for data processing and insights
- Modular design for scalable geographic analysis

### ❓FAQ

#### How many competitors should I analyze?

For robust market analysis, scrape **15–30 competitors** with **100 reviews each**. This provides sufficient data density while managing costs. Smaller markets may require only **10–15 competitors**.

#### Can I track competitive changes over time?

Yes. Schedule regular data extraction (weekly or monthly) using Apify's scheduling feature. Compare outputs to identify trends, new entrants, and shifting customer sentiment.

#### What industries work best with this analysis?

Local service businesses with a Google Maps presence are the easiest to compare. B2B services with limited online presence may yield fewer insights due to a lack of reviews.

# Actor input Schema

## `searchStringsArray` (type: `array`):

Type what you’d normally search for in the Google Maps search bar, like <b>English breakfast</b> or <b>pet shelter</b>. Aim for unique terms for faster processing. Using similar terms (e.g., <b>bar</b> vs. <b>restaurant</b> vs. <b>cafe</b>) may slightly increase your capture rate but is less efficient.<br><br> ⚠️ Heads up: Adding a location directly to the search, e.g., <b>restaurant Pittsburgh</b>, can limit you to a maximum of 120 results per search term due to <a href='https://blog.apify.com/google-places-api-limits/#%E2%9B%94-what-are-google-maps-limitations-for-scraping'>Google Maps' scrolling limit</a>.<br><br> You can also use direct place IDs here in the format <code>place\_id:ChIJ8\_JBApXMDUcRDzXcYUPTGUY</code>.See the [detailed description](https://apify.com/compass/crawler-google-places#search-terms).

## `locationQuery` (type: `string`):

Define location using free text. Simpler formats work best; e.g., use City + Country rather than City + Country + State. Verify with the <a href='https://nominatim.openstreetmap.org/ui/search.html'>OpenStreetMap webapp</a> for visual validation of the exact area you want to cover. <br><br>⚠️ Automatically defined City polygons may be smaller than expected (e.g., they don't include agglomeration areas). If you need to define the whole city area, head over to the 📡 <b>Geolocation parameters\*</b> section instead to select Country, State, US County, City, or Postal code.<br>For an even more precise location definition (especially when using City name as a starting point), head over to <b>🛰 Custom search area</b> section to create polygon shapes of the areas you want to scrape. Note that 📍 <b>Location</b> settings always take priority over <b>📡 Geolocation\*</b> (so use either section but not both at the same time). <br><br>For guidance and tricks on location definition, check <a href='https://blog.apify.com/google-places-api-limits/#2-choose-the-location-using-regular-toponomy%F0%9F%93%8D'>our tutorial</a>.

## `maxCrawledPlacesPerSearch` (type: `integer`):

Number of results you expect to get per each Search term, Category or URL. The higher the number, the longer it will take. <br><br>If you want to scrape all the places available, <b>leave this field empty</b> or use this section <b>🧭 Scrape all places on the map\*</b>.

## `language` (type: `string`):

Results details will show in this language.

## `categoryFilterWords` (type: `array`):

You can limit the places that are scraped based on the Category filter; you can choose as many categories for one flat fee for the whole field. ⚠️ Using categories can sometimes lead to false negatives, as many places do not properly categorize themselves, and there are over <a href='https://api.apify.com/v2/key-value-stores/epxZwNRgmnzzBpNJd/records/categories'> 4,000</a> available categories which Google Maps has. Using categories might filter out places that you’d like to scrape. To avoid this problem, you must list all categories that you want to scrape, including synonyms, e.g., divorce lawyer, divorce attorney, divorce service, etc. See the [detailed description](https://apify.com/compass/crawler-google-places#categories).

## `searchMatching` (type: `string`):

Restrict what places are scraped based on matching their name with provided 🔍 <b>Search term</b>. E.g., all places that have <b>chicken</b> in their name vs. places called <b>Kentucky Fried Chicken</b>.

## `placeMinimumStars` (type: `string`):

Scrape only places with a rating equal to or above the selected stars. Places without reviews will also be skipped. Keep in mind, filtering by reviews reduces the number of places found per credit spent, as many will be excluded.

## `skipClosedPlaces` (type: `boolean`):

Skip places that are marked as temporary or permanently closed. Ideal for focusing on currently open places.

## `countryCode` (type: `string`):

Set the country where the data extraction should be carried out, e.g., <b>United States</b>.

## `city` (type: `string`):

Enter the city where the data extraction should be carried out, e.g., <b>Pittsburgh</b>.<br><br>⚠️ <b>Do not include State or Country names here.</b><br><br>⚠️ Automatic City polygons may be smaller than expected (e.g., they don't include agglomeration areas). If you need that, set up the location using Country, State, US County, City, or Postal code.<br>For an even more precise location definition (, head over to <b>🛰 Custom search area</b> section to create polygon shapes of the areas you want to scrape.

## `state` (type: `string`):

Set a state where the data extraction should be carried out, e.g., <b>Massachusetts</b> (mainly for the US addresses).<br><br>⚠️ <b>Always combine State with other Location types</b>, otherwise you will scrape the whole state!

## `county` (type: `string`):

Set the US county where the data extraction should be carried out, e.g., <b>Madison</b>.<br><br>⚠️ <b>Always combine US county with other Location types</b>, otherwise you will scrape the whole county!

## `postalCode` (type: `string`):

Set the postal code of the area where the data extraction should be carried out, e.g., <b>10001</b>. <br><br>⚠️ <b>Combine Postal code only with 🗺 Country, never with 🌇 City. You can only input one postal code at a time.</b>

## `customGeolocation` (type: `object`):

Use this field to define the exact search area if other search area parameters don't work for you. See <a href='https://apify.com/compass/crawler-google-places#custom-search-area' target='_blank' rel='noopener'>readme</a> or <a href='https://blog.apify.com/google-places-api-limits/#1-create-a-custom-area-by-using-pairs-of-coordinates-%F0%9F%93%A1' target='_blank' rel='noopener'>our guide</a> for details.

## `startUrls` (type: `array`):

Max 300 results per search URL. Valid format for URLs contains <code>google.com/maps/</code>. This feature also supports uncommon URL formats such as: <code>google.com?cid=\*\*\*</code>, <code>goo.gl/maps</code>, and custom place list URL.

## Actor input object example

```json
{
  "searchStringsArray": [
    "restaurant"
  ],
  "locationQuery": "New York, USA",
  "maxCrawledPlacesPerSearch": 20,
  "language": "en",
  "searchMatching": "all",
  "placeMinimumStars": "",
  "skipClosedPlaces": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchStringsArray": [
        "restaurant"
    ],
    "locationQuery": "New York, USA",
    "maxCrawledPlacesPerSearch": 20,
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/competitive-intelligence-agent").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchStringsArray": ["restaurant"],
    "locationQuery": "New York, USA",
    "maxCrawledPlacesPerSearch": 20,
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("apify/competitive-intelligence-agent").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchStringsArray": [
    "restaurant"
  ],
  "locationQuery": "New York, USA",
  "maxCrawledPlacesPerSearch": 20,
  "language": "en"
}' |
apify call apify/competitive-intelligence-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apify/competitive-intelligence-agent",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/AEIpBIIzlKDhENIHi/builds/lKWpxlDgY6lPU4hks/openapi.json
