{
  "openapi": "3.0.1",
  "info": {
    "title": "Goofish Scraper 闲鱼 Xianyu (Idlefish)—Search, Prices & Seller",
    "description": "[100% No Cookie / No Login — $4.5/1k] All-in-one Goofish (闲鱼 / Xianyu / Idlefish) C2C marketplace API. Extract newest listings, CNY prices, want counts, 50+ item details, HD images, seller shop inventory, Sesame Credit & buyer reviews. Auto EN/Pinyin→ZH translation.",
    "version": "0.0",
    "x-build-id": "UUfrnV6bY8JeF0Fd4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axon-studio~goofish-xianyu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axon-studio-goofish-xianyu-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/axon-studio~goofish-xianyu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axon-studio-goofish-xianyu-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/axon-studio~goofish-xianyu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axon-studio-goofish-xianyu-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "item_details",
              "seller_items",
              "seller_profile"
            ],
            "type": "string",
            "description": "Select the primary extraction mode: search second-hand listings by keywords/URLs, extract 50+ deep fields for specific item IDs/URLs, fetch all active listings from a seller shop, or extract seller credit profiles and buyer reviews.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search Queries (English, Pinyin, or Chinese)",
            "type": "array",
            "description": "Enter one or more keywords, brand names, model numbers, or anime IP names (e.g., 'Labubu', 'iPhone', 'RTX 4090', 'Pop Mart', 'Leica'). When Auto-Localize is enabled, English and Pinyin queries are automatically mapped to high-recall Chinese Goofish search terms.",
            "default": [
              "Labubu",
              "iPhone"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Goofish Search URLs (Optional)",
            "type": "array",
            "description": "Optional list of direct Goofish search URLs (e.g., https://www.goofish.com/search?q=Labubu). The scraper automatically parses the 'q' query parameter and merges it with your search queries.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "detailLevel": {
            "title": "Search Detail Level",
            "enum": [
              "full",
              "fast"
            ],
            "type": "string",
            "description": "Choose 'full' (default) to enrich every discovered search listing concurrently via the Goofish Item Detail API (full long-form description, all HD images, specifications dict, view counts, and seller credit metrics), or 'fast' to return search feed fields rapidly.",
            "default": "full"
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "default",
              "newest",
              "wants",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Sort Goofish search results by Comprehensive Relevance, Newest Published First (essential for deal sniping and arbitrage), Most Wants (highest buyer demand), or Price Ascending / Descending.",
            "default": "default"
          },
          "minPrice": {
            "title": "Minimum Price (CNY ¥)",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum listing price in Chinese Yuan (CNY ¥). Applied both at the MTOP API query layer and strictly verified during local item parsing."
          },
          "maxPrice": {
            "title": "Maximum Price (CNY ¥)",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum listing price in Chinese Yuan (CNY ¥). Applied both at the MTOP API query layer and strictly verified during local item parsing."
          },
          "publishedWithin": {
            "title": "Published Within",
            "enum": [
              "any",
              "1d",
              "3d",
              "7d",
              "14d"
            ],
            "type": "string",
            "description": "Filter listings by how recently they were published on Goofish (Last 24 hours, 3 days, 7 days, or 14 days).",
            "default": "any"
          },
          "verifiedRecentOnly": {
            "title": "Verified Recent Only (Exclude Re-polished Old Listings)",
            "type": "boolean",
            "description": "When enabled, excludes older listings that sellers artificially bumped/re-polished ('擦亮') and retains only genuinely newly created items.",
            "default": false
          },
          "quickFilters": {
            "title": "Quick Trust & Condition Filter",
            "enum": [
              "none",
              "free_shipping",
              "brand_new",
              "inspected",
              "credit_excellent"
            ],
            "type": "string",
            "description": "Apply Goofish trust and condition badges: Free Shipping (包邮), Brand New (全新), Official Inspection / Yanhuobao (验货宝), or Zhima Credit Excellent (芝麻信用极好).",
            "default": "none"
          },
          "regionFilter": {
            "title": "Seller Region / Province Filter (Optional)",
            "type": "string",
            "description": "Filter listings by seller shipping province or city in either Chinese or English (e.g., '广东', '上海', '北京', '浙江', 'Guangdong', 'Shanghai', 'Beijing', 'Zhejiang').",
            "default": ""
          },
          "autoLocalize": {
            "title": "Auto-Localize English & Pinyin Brand Names",
            "type": "boolean",
            "description": "Automatically translates and expands English/Pinyin brand and IP queries (e.g. 'huananzhi' -> '华南金牌', 'pop mart' -> '泡泡玛特', 'genshin' -> '原神', 'lv' -> '路易威登') using the built-in Goofish dictionary and Google Translate fallback for maximum Chinese marketplace recall.",
            "default": true
          },
          "itemIds": {
            "title": "Target Item IDs or Goofish Item URLs (For Item Details Mode)",
            "type": "array",
            "description": "Provide numeric Goofish item IDs (e.g., '850620703054') or full item URLs (e.g., 'https://www.goofish.com/item?id=850620703054') when using 'item_details' mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sellerIds": {
            "title": "Target Seller User IDs or Profile URLs (For Seller Modes)",
            "type": "array",
            "description": "Provide Goofish seller userIds or profile URLs (e.g., 'https://www.goofish.com/personal?userId=...') when using 'seller_items' or 'seller_profile' mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeSellerProfiles": {
            "title": "Cascade Seller Profiles & Reviews (In Search / Item Details Mode)",
            "type": "boolean",
            "description": "When enabled during 'search' or 'item_details' mode, automatically fetches and emits a dedicated 'seller_profile' record (including Zhima credit, good rate, and recent buyer reviews) for each unique seller encountered.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum Primary Results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of primary records (listings or seller profiles) to collect across the run.",
            "default": 30
          },
          "onlyNewResults": {
            "title": "Delta Mode (Emit Only Unseen Listings Across Runs)",
            "type": "boolean",
            "description": "When enabled, persists seen itemId values in a named Apify Key-Value Store across scheduled runs and outputs only newly discovered listings.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Configure proxy routing for Goofish MTOP requests. Direct connection works out-of-the-box; enable Apify Proxy if running high-volume concurrent tasks.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}