{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Media Monitoring API - Mentions, Sentiment, Talkwalker",
    "description": "Export social media monitoring data from your own Talkwalker account: mentions with sentiment, reach, engagement, author and country from projects or the global index, plus histograms, top influencers, topics, custom tags, export task results and credits. Read only. Bring your own token.",
    "version": "0.1",
    "x-build-id": "Re0EeGs29BPhwSZpd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~social-media-monitoring-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-social-media-monitoring-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~social-media-monitoring-search-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-social-media-monitoring-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~social-media-monitoring-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-social-media-monitoring-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to read",
            "enum": [
              "projects",
              "search",
              "histogram",
              "topInfluencers",
              "topics",
              "resources",
              "tags",
              "streams",
              "exportTasks",
              "collectorResults",
              "credits"
            ],
            "type": "string",
            "description": "Projects lists every project linked to your API application and needs nothing else, so it is the default. Search results read documents (mentions) from a project or, with no project ID, from the 30 day global index. Histogram counts documents over time or by a metric. Top influencers, topics and filters, project resources and custom tags read one project. Streams and collectors, export tasks and the credit balance read the account. Collector results read the documents an export task queued in a collector.",
            "default": "projects"
          },
          "projectId": {
            "title": "Project ID",
            "type": "string",
            "description": "The Talkwalker project ID, as the projects mode lists it (for example a1ab1abc-a123-123a-123a-abcd12ab1a12). Needed by top influencers, topics, resources and tags. Optional for search results and histogram: without it they read the global index, which needs a query."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Search results, histogram and top influencers. A query in Talkwalker query syntax, such as tesla AND \"electric car\" AND lang:en, or sourcetype:ONLINENEWS AND published:>1727740800000. Optional in a project (the project topics apply), required for the global index."
          },
          "topicIds": {
            "title": "Topic IDs",
            "type": "array",
            "description": "Project modes. Keep only documents matching these topics, as the topics or resources mode lists them.",
            "items": {
              "type": "string"
            }
          },
          "filterIds": {
            "title": "Filter IDs",
            "type": "array",
            "description": "Project modes. Apply these saved filters of the project.",
            "items": {
              "type": "string"
            }
          },
          "channelIds": {
            "title": "Channel IDs",
            "type": "array",
            "description": "Project modes. Keep only documents from these channels of the project.",
            "items": {
              "type": "string"
            }
          },
          "panelIds": {
            "title": "Source panel IDs",
            "type": "array",
            "description": "Project modes. Keep only documents from these source panels of the project.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Dataset IDs",
            "type": "array",
            "description": "Project modes, Customer Intelligence projects only. Read these imported datasets. The provider cannot query datasets older than 7 days.",
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "Search results. How far back to read, as a number and a unit: s, m, h, d, w or M, such as 7d or 3M. The global index holds the last 30 days; a project holds its full history. Leave empty for the provider default."
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "Search results and histogram. A timezone name such as Europe/Luxembourg for the time range and time bins. Defaults to UTC."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "engagement",
              "published",
              "reach",
              "facebook_shares",
              "facebook_likes",
              "twitter_shares",
              "twitter_retweets",
              "twitter_followers",
              "youtube_likes",
              "youtube_dislikes",
              "youtube_views",
              "cluster_size",
              "comment_count",
              "search_indexed",
              "trending_score"
            ],
            "type": "string",
            "description": "Search results. The documented sort fields. Defaults to engagement.",
            "default": "engagement"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Search results. Descending or ascending.",
            "default": "desc"
          },
          "highlight": {
            "title": "Highlight matches",
            "type": "boolean",
            "description": "Search results. Wrap matching keywords in bold tags in the title and content snippets.",
            "default": true
          },
          "histogramType": {
            "title": "Histogram type",
            "enum": [
              "published",
              "search_indexed",
              "reach",
              "engagement",
              "facebook_shares",
              "facebook_likes",
              "twitter_retweets",
              "twitter_shares",
              "twitter_likes",
              "twitter_followers",
              "twitter_impressions",
              "twitter_video_views",
              "instagram_likes",
              "youtube_views",
              "youtube_likes",
              "youtube_dislikes",
              "comment_count",
              "language",
              "country",
              "source_region",
              "source_city",
              "gender",
              "age",
              "unique_author",
              "theme_cloud",
              "trending_top_theme",
              "hashtag",
              "mentions",
              "trending_mentions",
              "emoji",
              "smart_theme",
              "interest",
              "occupation",
              "sentiment"
            ],
            "type": "string",
            "description": "Histogram. published and search_indexed count documents over time; reach, engagement and the network metrics bin by value; language, country, gender, age, theme_cloud, hashtag, emoji and the others are distributions.",
            "default": "published"
          },
          "histogramMin": {
            "title": "Histogram start",
            "type": "string",
            "description": "Histogram. The lowest bin, as YYYY-MM-DD or epoch milliseconds for time histograms. The provider defaults to the last 8 days."
          },
          "histogramMax": {
            "title": "Histogram end",
            "type": "string",
            "description": "Histogram. The highest bin (exclusive), as YYYY-MM-DD or epoch milliseconds."
          },
          "interval": {
            "title": "Interval",
            "type": "string",
            "description": "Histogram. The bin size: a duration such as hour, day, 1w or 720d for published and search_indexed, or a number for value histograms. Not used by distributions."
          },
          "breakdown": {
            "title": "Breakdown",
            "enum": [
              "none",
              "sentiment",
              "sourcetype",
              "country",
              "topic",
              "channel"
            ],
            "type": "string",
            "description": "Histogram. Split each time bin by sentiment, source type or country, or in a project by topic or channel.",
            "default": "none"
          },
          "valueType": {
            "title": "Nested metric",
            "type": "string",
            "description": "Histogram. Sum a metric such as engagement or reach inside each time bin, in addition to the count."
          },
          "topN": {
            "title": "Top N",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Histogram. How many values a distribution returns, such as the top 10 countries."
          },
          "forecastDays": {
            "title": "Forecast days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Histogram in a project, published or search_indexed only, on projects with forecasting enabled. Days of forecast to add, 1 to 90."
          },
          "influencerType": {
            "title": "Influencer type",
            "enum": [
              "author",
              "source"
            ],
            "type": "string",
            "description": "Top influencers. Authors or sources (sites and accounts).",
            "default": "author"
          },
          "influencerSort": {
            "title": "Rank influencers by",
            "enum": [
              "total",
              "positive",
              "negative",
              "neutral",
              "reach",
              "engagement",
              "engagement_per_mention",
              "reach_per_mention"
            ],
            "type": "string",
            "description": "Top influencers. Always descending. The provider returns up to 100.",
            "default": "total"
          },
          "resourceType": {
            "title": "Resource type",
            "enum": [
              "all",
              "search",
              "filter",
              "page",
              "event",
              "panel"
            ],
            "type": "string",
            "description": "Project resources. Limit to one resource type.",
            "default": "all"
          },
          "taskId": {
            "title": "Export task ID",
            "type": "string",
            "description": "Export tasks. Read one task by ID; leave empty to list all recent tasks."
          },
          "collectorId": {
            "title": "Collector ID",
            "type": "string",
            "description": "Collector results. The collector an export task or stream fills, as the streams mode lists it."
          },
          "resumeOffset": {
            "title": "Resume offset",
            "type": "string",
            "description": "Collector results. Where to start: earliest (the default), latest, or the resume offset a previous run logged."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Search results page up to 500 at a time, up to 10,000 per project query and 500 in the global index.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Pacing. The provider allows 60 search calls and 30 histogram calls a minute in a project, and 10 a minute on the credit endpoint.",
            "default": 30
          },
          "apiKey": {
            "title": "Access token",
            "type": "string",
            "description": "Your own Talkwalker API access token, from your Talkwalker API application. Stored as a secret. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}