{
  "openapi": "3.0.1",
  "info": {
    "title": "Jarir Bookstore Scraper - Products, Prices, Stock & Reviews",
    "description": "Scrape Jarir Bookstore (jarir.com) across Saudi Arabia, UAE, Kuwait, Qatar and Bahrain in English or Arabic. Extract electronics, books, computers and office supplies with prices, discounts, stock, specifications, variants and expert reviews. Search by keyword, category or URL.",
    "version": "0.1",
    "x-build-id": "1aWE9gQsbbJigH9kD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~jarir-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-jarir-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/abotapi~jarir-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-jarir-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/abotapi~jarir-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-jarir-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": "Mode",
            "enum": [
              "search",
              "category",
              "url"
            ],
            "type": "string",
            "description": "Choose 'search' to run keyword searches, 'category' to read whole catalog categories, or 'url' to paste search, category or product links.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "One or more keywords to search on jarir.com, for example 'iphone', 'laptop', 'printer ink' or an author or book title. Each keyword is searched separately, in the market and language picked below.",
            "default": [
              "iphone"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Pick one or more of the store's top-level catalog categories; each is read to its end (or until Max items). For any other category, paste its link in URL mode instead.",
            "items": {
              "type": "string",
              "enum": [
                "1008",
                "1321",
                "1339",
                "1377",
                "1429",
                "1190",
                "1315",
                "1335",
                "1361",
                "900",
                "2148",
                "1058",
                "1298",
                "6",
                "146",
                "318",
                "235",
                "2054",
                "648",
                "431",
                "1739",
                "1188",
                "2082",
                "1180",
                "1733",
                "1181",
                "1183",
                "1201",
                "1182",
                "1962"
              ],
              "enumTitles": [
                "Smartphones",
                "Computers & Tablets",
                "Smartwatches & Wearables",
                "Speakers, Headsets & Gadgets",
                "Smartphone Accessories",
                "Smart TV & Accessories",
                "Printers & Scanners",
                "Monitors & Projectors",
                "Smart Home",
                "Computer Supplies",
                "Video & PC Gaming",
                "Video Games",
                "Digital Cards",
                "Office Supplies",
                "School Supplies",
                "Arts & Crafts",
                "Toys & Kids Learning",
                "Musical Instruments",
                "English Books",
                "Arabic Books",
                "Audio & eBooks",
                "Renewed Products",
                "Clearance Offers",
                "Weekly Offers",
                "Best Deals",
                "New Arrivals",
                "Trending Now",
                "Best Sellers",
                "Online Exclusive",
                "Global Shipping"
              ]
            },
            "default": [
              "1008"
            ]
          },
          "urls": {
            "title": "Links to read",
            "type": "array",
            "description": "Paste jarir.com links: a search page (/sa-en/catalogsearch/result?search=...), a category page (/sa-en/headphones-40027.html or /sa-en/english-electronics.html), a short category link (/sa-en/c/665), a product page (/sa-en/apple-airpods-4-headsets-642550.html) or a short product link (/sa-en/SKU/642550). Every market and language prefix works: /sa-en, /sa-ar (no prefix), /ae-en, /kw-en, /qa-en, /bh-en and their Arabic versions.",
            "default": [
              "https://www.jarir.com/sa-en/catalogsearch/result?search=galaxy",
              "https://www.jarir.com/sa-en/headphones-40027.html",
              "https://www.jarir.com/sa-en/english-electronics.html",
              "https://www.jarir.com/sa-en/c/665",
              "https://www.jarir.com/sa-en/apple-airpods-4-headsets-642550.html",
              "https://www.jarir.com/apple-airpods-4-headsets-642550.html",
              "https://www.jarir.com/sa-en/SKU/689710",
              "https://www.jarir.com/qa-en/apple-airpods-5-headsets-689544.html",
              "https://www.jarir.com/kw-ar/headphones-40027.html"
            ],
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "Market",
            "enum": [
              "SA",
              "AE",
              "KW",
              "QA",
              "BH"
            ],
            "type": "string",
            "description": "The Jarir store to read for keyword and category runs: its catalog and its currency in price fields. Saudi Arabia has by far the largest catalog (most books are sold there); the other Gulf stores carry a smaller range.",
            "default": "SA"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ar"
            ],
            "type": "string",
            "description": "Language of product names, categories, specification labels and descriptions for keyword and category runs.",
            "default": "en"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "The storefront's own sort order for keyword searches, categories and pasted search links. A pasted category link keeps the store's own category order.",
            "default": "relevance"
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Optional. Keep only products from these brands, spelled as the store spells them (for example 'Apple', 'Samsung', 'HP'). Several brands are combined as 'any of these'.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only keep products priced at or above this amount, in the market's currency (SAR for Saudi Arabia, AED for the UAE ...). The filter applies to each product's real (sale) price: the store's listing index prices a product at its regular price, so a filtered run reads every candidate's product record before the cut and bills the product-record event for the rows it returns."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only keep products priced at or below this amount, in the market's currency. The filter applies to each product's real (sale) price: the store's listing index prices a product at its regular price, so the search itself is widened above this edge to admit sale items, and each candidate's product record is read (and billed for returned rows) before the exact cut."
          },
          "fetchDetails": {
            "title": "Fetch product details",
            "type": "boolean",
            "description": "Read each keyword or category row's full product record to add the regular and sale price, stock, order limits, description, gallery, variants, warranty code, delivery and payment options. Charged once per row enriched. Rows from pasted category and product links already carry all of this from the same read and are never charged for it. Turn off for a faster, cheaper listing-level pull.",
            "default": true
          },
          "fetchReviews": {
            "title": "Fetch reviews",
            "type": "boolean",
            "description": "Attach each returned product's review score summary and up to Max reviews per product reviews: expert reviews from published tech reviews (publication, score, title, extract, pros and cons, link) and customer reviews where the store has any. Charged once per product row that has at least one review attached; never for products without reviews, for unchanged rows left out in incremental mode, or when switched off.",
            "default": true
          },
          "maxReviews": {
            "title": "Max reviews per product",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many reviews to attach to each product when Fetch reviews is on. Use 0 to skip reviews entirely (no review reads, no review charge).",
            "default": 20
          },
          "maxItemsPerSearch": {
            "title": "Max items per keyword, category or link",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Caps how many products each keyword, category or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-keyword cap; Max items below still caps the run.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is fast and cheap. Use 0 for unlimited (a whole category or a whole market's catalog).",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave this on the default (Automatic) for most runs; it is measured to work and runs on every plan. Residential is recommended for the most reliable results on large or frequent runs, and is billed to your own Apify plan.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed, except the result position, the scrape time, the keyword or link it was found through, the store's own record-sync date (updatedAt), its related-product lists (similarProductSkus, boughtTogetherSkus), its attached reviews and review score summary, and by default its promo tagline and merchandising tags (see Ignore fields below); with 'Price and stock only' just price, sale and stock fields are compared. State is kept separately for each keyword, category, link, market, language, filter and detail setup; use State key to name or deliberately share a monitoring campaign.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup."
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "'Price and stock only' compares just price, original price, sale status, stock, availability and per-variant prices; a description, image, specification or tag change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes).",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact UPDATED rows (incremental mode only)",
            "type": "boolean",
            "description": "When on, an UPDATED row carries only identifiers plus the price/stock fields that actually moved (priceChanges, variantChanges), instead of the full record. Off by default.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Missed scans before EXPIRED (incremental mode only)",
            "minimum": 1,
            "type": "integer",
            "description": "A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.",
            "default": 1
          },
          "emitUnchanged": {
            "title": "Emit unchanged products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search, never when Max items capped it or when Resume was used. This returns, and bills, extra synthetic rows.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Field names that must NOT count as a change in incremental mode. The default list leaves out the promo tagline (promoTagline) and the merchandising tags (tags, for example 'Weekly Offers' or 'Clearance Offers'), which the store re-assigns per campaign; remove names from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.",
            "default": [
              "promoTagline",
              "tags"
            ],
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}