{
  "openapi": "3.0.1",
  "info": {
    "title": "Flipkart Bulk Product Enrichment & Search",
    "description": "Bulk Flipkart product enrichment by FSN (name, brand, MRP, selling price, discount, rating, image, availability) and search/category listings: optionally pincode-scoped for Flipkart Grocery and Minutes.",
    "version": "0.1",
    "x-build-id": "fX8XGAciXrt1NRVTY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ikmal_suzali_atr~flipkart-product-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ikmal_suzali_atr-flipkart-product-data",
        "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/ikmal_suzali_atr~flipkart-product-data/runs": {
      "post": {
        "operationId": "runs-sync-ikmal_suzali_atr-flipkart-product-data",
        "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/ikmal_suzali_atr~flipkart-product-data/run-sync": {
      "post": {
        "operationId": "run-sync-ikmal_suzali_atr-flipkart-product-data",
        "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": {
          "productIds": {
            "title": "Product IDs (FSNs)",
            "type": "array",
            "description": "Flipkart product IDs to enrich, e.g. `PSLGFSY3FKSMGZVZ`. Product URLs are accepted too (the `pid=` or `/p/itm…` part is extracted). Books may be given as `BOK<ISBN13>` or the bare ISBN-13. Up to ~120 are resolved per request, so 100k IDs take minutes.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Flipkart search terms, e.g. `whey protein`. Each query is paginated up to Max pages.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "Flipkart search or category page URLs, e.g. `https://www.flipkart.com/mobiles/pr?sid=tyy,4io` or a search URL with filters applied.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages per query/URL",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Search pages return 40 products, category pages 24.",
            "default": 5
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "",
              "price_asc",
              "price_desc",
              "recency_desc",
              "popularity"
            ],
            "type": "string",
            "description": "Flipkart's default popularity sort reshuffles between requests, so paginating it repeats/misses products. Use a deterministic sort when you need complete pagination.",
            "default": ""
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "FLIPKART",
              "GROCERY",
              "HYPERLOCAL"
            ],
            "type": "string",
            "description": "FLIPKART (national), GROCERY (Flipkart Supermart) or HYPERLOCAL (Flipkart Minutes). Grocery and Minutes are location-gated — set a pincode.",
            "default": "FLIPKART"
          },
          "pincode": {
            "title": "Pincode",
            "pattern": "^[1-9][0-9]{5}$",
            "type": "string",
            "description": "Indian pincode for location-scoped prices/availability. Required for GROCERY and HYPERLOCAL; optional for FLIPKART."
          },
          "includeUnresolved": {
            "title": "Include unresolved IDs",
            "type": "boolean",
            "description": "Emit a `{ product_id, found: false }` row for IDs Flipkart does not return (delisted or invalid).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most runs — Flipkart's public endpoints serve these requests without a proxy. Enable Apify residential proxy (country IN) only if you see 529/403 responses at high volume.",
            "default": {
              "useApifyProxy": false
            }
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. 3 is plenty without a proxy (~8 req/s ≈ 800 products/s); raise to 8–12 through a residential proxy.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}