{
  "openapi": "3.0.1",
  "info": {
    "title": "Lemon8 Search Scraper",
    "description": "Scrape Lemon8 posts by keyword in 10 regions: titles, full text, hashtags, likes, saves, comments, views, images, video links, authors and comment threads with replies. Monitor searches with incremental mode. Export JSON, CSV or Excel via API.",
    "version": "1.0",
    "x-build-id": "NQLx748kt8N609bE7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~lemon8-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-lemon8-search-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/parsebird~lemon8-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-lemon8-search-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/parsebird~lemon8-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-lemon8-search-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": {
          "searchTerm": {
            "title": "Search Term",
            "type": "string",
            "description": "Enter a keyword to search Lemon8 for, such as <code>skincare</code>, <code>matcha latte</code> or <code>gym outfit</code>. Used only when Start URLs is empty.",
            "default": "fashion"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Lemon8 discover links instead of a Search Term, e.g. <code>https://www.lemon8-app.com/discover/coffee?region=jp</code>. The keyword and region are read from each link. Takes precedence over Search Term when set.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "enum": [
              "us",
              "au",
              "nz",
              "jp",
              "th",
              "id",
              "vn",
              "my",
              "sg",
              "ca"
            ],
            "type": "string",
            "description": "Pick the Lemon8 region to search. Links in Start URLs use the region in the link and fall back to this one.",
            "default": "us"
          },
          "limit": {
            "title": "Post Limit",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of posts to extract for each Search Term or link (1 to 5,000). Search results come first, then posts Lemon8 lists as related to them.",
            "default": 50
          },
          "getDetails": {
            "title": "Get Detailed Post Data",
            "type": "boolean",
            "description": "Open each post for its full text, hashtags, related topics, location, all images, the video file link and the comment thread with replies. Turn off for a faster pass over the listings only. The price per post is the same.",
            "default": true
          },
          "detailsLimit": {
            "title": "Detailed Posts Limit",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Fetch detailed data for only the first N posts of each Search Term or link. Leave empty to get details for every post."
          },
          "commentExpansionTimeout": {
            "title": "Comment Timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Seconds to spend loading one post's comments and replies before moving on (10 to 300). <code>commentStats.complete</code> shows whether the whole thread was loaded.",
            "default": 30
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Turn on for recurring runs: each post is marked NEW, UPDATED, UNCHANGED, REAPPEARED or EXPIRED compared with earlier runs of the same search. Only NEW, UPDATED and REAPPEARED posts are returned by default.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for this monitoring campaign, e.g. <code>streetwear-sg-daily</code>. Runs with the same key share history. Leave empty to derive one from the search terms and regions."
          },
          "emitUnchanged": {
            "title": "Return unchanged posts",
            "type": "boolean",
            "description": "Also return (and pay for) UNCHANGED posts on every run.",
            "default": false
          },
          "emitExpired": {
            "title": "Return expired posts",
            "type": "boolean",
            "description": "Also return (and pay for) tracked posts that no longer appear in a search's results. Only checked when the search finishes without being stopped by the spending limit.",
            "default": false
          },
          "resumeFromRunId": {
            "title": "Resume from run or dataset ID",
            "type": "string",
            "description": "Enter the ID of an interrupted run (or its dataset) of this Actor. Posts already saved there are skipped and not charged again; they still count toward Post Limit."
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Lemon8 limits how many post pages one IP can open, so Apify Proxy is recommended. Left completely empty (for example in a bare API call), the Actor connects directly and moves to Apify Proxy if Lemon8 starts refusing requests."
          },
          "dev_transform_fields": {
            "title": "Return only these fields",
            "type": "array",
            "description": "Return only the listed fields per post, e.g. <code>id</code>, <code>author.name</code>, <code>statistics.likesCount</code>, <code>images.0.src</code>. Use a dot path for nested objects and a number for array items. Each path becomes a column named after it.",
            "items": {
              "type": "string"
            }
          },
          "dev_dataset_name": {
            "title": "Named dataset",
            "type": "string",
            "description": "Save results into a named dataset in your account instead of the run's default dataset. Supports <code>{ACTOR}</code>, <code>{DATE}</code> and <code>{TIME}</code> placeholders, e.g. <code>lemon8-{DATE}</code>. Leave empty or <code>default</code> for the default dataset."
          },
          "dev_dataset_clear": {
            "title": "Clear named dataset first",
            "type": "boolean",
            "description": "Delete everything in the named dataset before this run adds new posts.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}