{
  "openapi": "3.0.1",
  "info": {
    "title": "SparkFun Electronics Catalog, Search & Product Details",
    "description": "Find SparkFun electronic components by keyword or category, export category product listings, or extract detailed SKU, prices, availability, documents and source evidence from direct product links. Five bounded workflows: search, categories, category, item, batch.",
    "version": "0.0",
    "x-build-id": "gHGNS0GxCDvABx5e2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dromb~sparkfun-us-product-stage0/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dromb-sparkfun-us-product-stage0",
        "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/dromb~sparkfun-us-product-stage0/runs": {
      "post": {
        "operationId": "runs-sync-dromb-sparkfun-us-product-stage0",
        "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/dromb~sparkfun-us-product-stage0/run-sync": {
      "post": {
        "operationId": "run-sync-dromb-sparkfun-us-product-stage0",
        "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": {
          "operation": {
            "title": "What to collect",
            "enum": [
              "search",
              "categories",
              "category",
              "item",
              "batch"
            ],
            "type": "string",
            "description": "Choose search results, category directory, category products, one product card, or a batch of cards. Leave it unset for the original 1–2 page workflow."
          },
          "query": {
            "title": "Search keyword",
            "type": "string",
            "description": "For search: product name, part number or keyword (2–80 letters/numbers/safe punctuation)."
          },
          "categoryUrl": {
            "title": "Category URL",
            "type": "string",
            "description": "For category: copy a SparkFun category URL from the categories output, e.g. https://www.sparkfun.com/sensors/current.html."
          },
          "url": {
            "title": "Single product URL",
            "type": "string",
            "description": "For item: one direct canonical SparkFun .html product page, e.g. https://www.sparkfun.com/weather-meter-kit.html."
          },
          "page": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "One-based search/category page number (1–20)."
          },
          "pages": {
            "title": "Pages to fetch",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "For search/category: 1–3 consecutive pages per run (max page 20)."
          },
          "maxItems": {
            "title": "Maximum listing results",
            "minimum": 1,
            "maximum": 72,
            "type": "integer",
            "description": "For search/category: maximum 1–72 unique listing products per run. Does not modify upstream page size."
          },
          "includeDetails": {
            "title": "Follow listings to complete product pages",
            "type": "boolean",
            "description": "Optional for search/category: fetch and validate each listed product page, adding detail as a nested object. Requires maxItems <= 10. Extra seller requests; disabled unless explicitly true."
          },
          "productUrls": {
            "title": "SparkFun product pages (1–2 URLs)",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Legacy input: 1–2 direct product pages if operation is omitted; also accepted for operation=item with exactly 1 URL. For multiple (up to 10), use batchUrls with operation=batch.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Product URL",
                  "type": "string",
                  "description": "Direct https://www.sparkfun.com/<product-slug>.html link. Other product pages can match the URL pattern but have not been qualified for extraction."
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "batchUrls": {
            "title": "Batch product URLs (1–10)",
            "minItems": 1,
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "For batch: 1–10 unique direct SparkFun product page URLs. Every page must validate before any Dataset write.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Product URL",
                  "type": "string",
                  "description": "Direct https://www.sparkfun.com/<product-slug>.html link. Other product pages can match the URL pattern but have not been qualified for extraction."
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}