{
  "openapi": "3.0.1",
  "info": {
    "title": "Moj Scraper",
    "description": "Scrape Moj (mojapp.in) short videos from profiles, hashtags and video URLs: views, likes, shares, captions, hashtags, music, author and comments.",
    "version": "0.4",
    "x-build-id": "6WZNrf6rgkVy0eFWg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ribtools~moj-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ribtools-moj-scraper",
        "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/ribtools~moj-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ribtools-moj-scraper",
        "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/ribtools~moj-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ribtools-moj-scraper",
        "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": {
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "Moj handles or profile URLs, one per row, e.g. moj, @moj or https://mojapp.in/@moj. Each profile's videos are scraped newest first. Fields left empty in a row use \"Default limits and filters\".",
            "items": {
              "type": "object",
              "properties": {
                "profile": {
                  "title": "Profile",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Handle or profile URL, e.g. moj, @moj or https://mojapp.in/@moj.",
                  "minLength": 1
                },
                "maxVideos": {
                  "title": "Max videos",
                  "type": "integer",
                  "editor": "number",
                  "description": "Maximum videos scraped from this profile.",
                  "minimum": 1
                },
                "publishedAfter": {
                  "title": "Videos published after",
                  "type": "string",
                  "editor": "datepicker",
                  "description": "Stops at the first video published before this date (YYYY-MM-DD)."
                },
                "publishedBefore": {
                  "title": "Videos published before",
                  "type": "string",
                  "editor": "datepicker",
                  "description": "Skips videos published after this date (YYYY-MM-DD)."
                },
                "commentsPerVideo": {
                  "title": "Comments per video ($)",
                  "type": "integer",
                  "editor": "number",
                  "description": "Comments add-on for this profile: top comments per video, charged per comment. 0 turns it off.",
                  "minimum": 0
                }
              },
              "required": [
                "profile"
              ],
              "additionalProperties": false
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtag names or tag URLs, one per row, e.g. comedy, #comedy or https://mojapp.in/tag/1467. Fields left empty in a row use \"Default limits and filters\".",
            "items": {
              "type": "object",
              "properties": {
                "hashtag": {
                  "title": "Hashtag",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Hashtag name or tag URL, e.g. comedy, #comedy or https://mojapp.in/tag/1467.",
                  "minLength": 1
                },
                "maxVideos": {
                  "title": "Max videos",
                  "type": "integer",
                  "editor": "number",
                  "description": "Maximum videos scraped from this hashtag.",
                  "minimum": 1
                },
                "commentsPerVideo": {
                  "title": "Comments per video ($)",
                  "type": "integer",
                  "editor": "number",
                  "description": "Comments add-on for this hashtag: top comments per video, charged per comment. 0 turns it off.",
                  "minimum": 0
                }
              },
              "required": [
                "hashtag"
              ],
              "additionalProperties": false
            }
          },
          "postURLs": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct Moj video URLs, one per row, e.g. https://mojapp.in/@moj/video/3629256923. Each URL returns one video.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Video URL",
                  "type": "string",
                  "editor": "textfield",
                  "description": "e.g. https://mojapp.in/@moj/video/3629256923",
                  "minLength": 1
                },
                "commentsPerVideo": {
                  "title": "Comments ($)",
                  "type": "integer",
                  "editor": "number",
                  "description": "Comments add-on for this video: top comments to scrape, charged per comment. 0 turns it off.",
                  "minimum": 0
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "maxVideos": {
            "title": "Videos per profile or hashtag",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum videos scraped from each profile and each hashtag. Video URLs are not limited.",
            "default": 100
          },
          "publishedAfter": {
            "title": "Profile videos published after",
            "type": "string",
            "description": "Profiles only. Stops at the first video published before this date (YYYY-MM-DD)."
          },
          "publishedBefore": {
            "title": "Profile videos published before",
            "type": "string",
            "description": "Profiles only. Skips videos published after this date (YYYY-MM-DD)."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Every profile, hashtag and video URL. Only keep videos with at least this many likes. Filtered-out videos are never charged."
          },
          "maxLikes": {
            "title": "Maximum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Every profile, hashtag and video URL. Only keep videos with at most this many likes. Filtered-out videos are never charged."
          },
          "commentsPerVideo": {
            "title": "Comments per video ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Also scrape up to this many top comments per video, charged per comment. 0 turns the add-on off.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}