=============== LIBRARY RULES =============== From library maintainers: - Each API is an Apify actor under the openclawai account, e.g. openclawai/job-board-scraper, openclawai/reddit-scraper, openclawai/google-maps-scraper. Call them through the Apify API, an Apify client or the Apify MCP server. - Authenticate with an Apify API token in the Authorization: Bearer header, read from the APIFY_TOKEN environment variable. Never put the token in the input JSON or in committed code. - Set a cost cap on every run: maxTotalChargeUsd (query parameter or JavaScript option) or max_total_charge_usd (Python). Runs bill per result to the caller's Apify account. - Check an actor's input fields at https://apify.com/openclawai//input-schema before building an input; start with a small limit such as maxItems 20. - Reddit Scraper needs no Reddit API key, Reddit app or Reddit login: it reads public Reddit data. - run-sync-get-dataset-items returns the rows in one request for runs under 5 minutes. For longer runs, start the run, wait for it to finish, then read its default dataset. - To give an MCP client one actor as a tool, use https://mcp.apify.com/?tools=fetch-actor-details,openclawai/. ### Install plugin from marketplace Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Install the Datapika plugin from the added marketplace on older Claude Code versions. ```bash /plugin install datapika@datapika ``` -------------------------------- ### Clone repository and install clients Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Clone the repository and install Python and Node.js dependencies. Python 3.11+ and Node.js 20+ required. ```bash git clone https://github.com/lnvestor/datapika-examples.git cd datapika-examples python -m pip install -r requirements.txt # Python 3.11 or newer npm install # Node.js 20 or newer ``` -------------------------------- ### Install Datapika Claude Code plugin Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Install the Datapika plugin (skill + MCP server) for Claude Code. On older versions, first add the marketplace then install. ```bash /plugin install datapika --marketplace lnvestor/datapika-examples ``` -------------------------------- ### Run the scraper examples with curl, Python, and Node.js Source: https://github.com/lnvestor/datapika-examples/blob/main/hotel-rental-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and writes to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./hotel-rental-scraper/curl.sh > output.json # curl, synchronous python hotel-rental-scraper/python/run.py # Python, apify-client node hotel-rental-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Example input JSON for user_posts mode Source: https://github.com/lnvestor/datapika-examples/blob/main/tiktok-douyin-bilibili-scraper/README.md Input configuration used in the examples. Sets mode to user_posts, targets the TikTok profile @tiktok, and limits results to 5 items. maxItems accepts 1 to 5,000. ```json { "mode": "user_posts", "urls": [ "https://www.tiktok.com/@tiktok" ], "maxItems": 5 } ``` -------------------------------- ### Run the scraper examples from the repository root Source: https://github.com/lnvestor/datapika-examples/blob/main/meta-ad-library-scraper/README.md Run the curl, Python, and Node.js examples from the repository root after setting up once. The Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./meta-ad-library-scraper/curl.sh > output.json # curl, synchronous ``` ```bash python meta-ad-library-scraper/python/run.py # Python, apify-client ``` ```bash node meta-ad-library-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Example input JSON for the scraper Source: https://github.com/lnvestor/datapika-examples/blob/main/hotel-rental-scraper/README.md Input configuration used in the examples. Searches Lisbon, Portugal for 2 nights with 2 adults across booking, airbnb, and vrbo, returning up to 2 results per site in USD. ```json { "location": "Lisbon, Portugal", "checkIn": "30 days", "nights": 2, "adults": 2, "sites": [ "booking", "airbnb", "vrbo" ], "maxResultsPerSite": 2, "currency": "USD" } ``` -------------------------------- ### Run the examples from repository root Source: https://github.com/lnvestor/datapika-examples/blob/main/trustpilot-reviews-scraper/README.md Commands to run the curl, Python, and Node.js examples. The Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./trustpilot-reviews-scraper/curl.sh > output.json # curl, synchronous python trustpilot-reviews-scraper/python/run.py # Python, apify-client node trustpilot-reviews-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Run scraper examples via curl, Python, and Node.js Source: https://github.com/lnvestor/datapika-examples/blob/main/tiktok-douyin-bilibili-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and writes output to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./tiktok-douyin-bilibili-scraper/curl.sh > output.json # curl, synchronous ``` ```bash python tiktok-douyin-bilibili-scraper/python/run.py # Python, apify-client ``` ```bash node tiktok-douyin-bilibili-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Run the Job Board Scraper examples (curl, Python, Node.js) Source: https://github.com/lnvestor/datapika-examples/blob/main/job-board-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and waits up to 300 seconds; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./job-board-scraper/curl.sh > output.json # curl, synchronous python job-board-scraper/python/run.py # Python, apify-client node job-board-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Run Google Maps Scraper examples (curl, Python, Node.js) Source: https://github.com/lnvestor/datapika-examples/blob/main/google-maps-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and writes output to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./google-maps-scraper/curl.sh > output.json # curl, synchronous ``` ```bash python google-maps-scraper/python/run.py # Python, apify-client ``` ```bash node google-maps-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Airbnb Scraper input JSON for search_by_url mode Source: https://github.com/lnvestor/datapika-examples/blob/main/airbnb-scraper/README.md Input used in the examples. The scripts fill in dates 30 days from today, so the example always searches the future. The searchUrl includes checkin and checkout placeholders (YYYY-MM-DD) and adults=2. ```json { "mode": "search_by_url", "searchUrl": "https://www.airbnb.com/s/Lisbon--Portugal/homes?checkin=YYYY-MM-DD&checkout=YYYY-MM-DD&adults=2", "currency": "USD", "maxResults": 5 } ``` -------------------------------- ### Input used in the examples (JSON) Source: https://github.com/lnvestor/datapika-examples/blob/main/job-board-scraper/README.md Example input configuration for the scraper. Searches for 'data engineer' in Austin, TX on LinkedIn and Indeed, with a maximum of 5 results per board and only jobs posted in the last 72 hours. ```json { "searchTerm": "data engineer", "location": "Austin, TX", "sites": [ "linkedin", "indeed" ], "maxResults": 5, "hoursOld": 72 } ``` -------------------------------- ### Run Reddit Scraper examples (curl, Python, Node.js) Source: https://github.com/lnvestor/datapika-examples/blob/main/reddit-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and writes to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./reddit-scraper/curl.sh > output.json # curl, synchronous ``` ```bash python reddit-scraper/python/run.py # Python, apify-client ``` ```bash node reddit-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### GET /v2/datasets/{datasetId}/items Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Downloads the items from a dataset in the specified format. Use this endpoint to retrieve the results of a finished run, for example as CSV. ```APIDOC ## [GET] /v2/datasets/{datasetId}/items ### Description Downloads the items from a dataset in the specified format. Use this endpoint to retrieve the results of a finished run, for example as CSV. ### Method GET ### Endpoint https://api.apify.com/v2/datasets/{datasetId}/items ### Parameters #### Path Parameters - **datasetId** (string) - Required - The ID of the dataset to download. #### Query Parameters - **format** (string) - Optional - Response format: json, jsonl, csv, xlsx, xml, html, or rss. ### Response #### Success Response (200) - Returns the dataset items in the specified format. ### Request Example ```bash curl -H "Authorization: Bearer $APIFY_TOKEN" \ "https://api.apify.com/v2/datasets//items?format=csv" > output.csv ``` ``` -------------------------------- ### Input JSON for the examples Source: https://github.com/lnvestor/datapika-examples/blob/main/meta-ad-library-scraper/README.md Input used in the examples. queries accepts keywords, Facebook page URLs, or numeric page IDs in any mix; country is a 2-letter code or ALL; maxAdsPerQuery ranges from 1 to 50,000. ```json { "queries": [ "https://www.facebook.com/nike" ], "country": "US", "maxAdsPerQuery": 5 } ``` -------------------------------- ### Run Google Flights scraper examples (curl, Python, Node.js) Source: https://github.com/lnvestor/datapika-examples/blob/main/google-flights-scraper/README.md Commands to run the scraper examples from the repository root. The curl command is synchronous and writes to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./google-flights-scraper/curl.sh > output.json # curl, synchronous python google-flights-scraper/python/run.py # Python, apify-client node google-flights-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### Python client call and list items Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts the actor run and waits for it to finish, then reads rows from the run's default dataset. Use for large runs; each actor README lists input fields and the input schema link shows the rest. ```python run = client.actor("openclawai/google-maps-scraper").call(run_input=run_input) items = client.dataset(run.default_dataset_id).list_items().items ``` -------------------------------- ### Input JSON for Google Maps Scraper Source: https://github.com/lnvestor/datapika-examples/blob/main/google-maps-scraper/README.md Example input for the scraper: searches for coffee shops in Austin, TX and returns up to 5 results. The query should include the place, and maxResults ranges from 1 to 500. ```json { "query": "coffee shops in Austin, TX", "maxResults": 5 } ``` -------------------------------- ### Run Claude Code MCP setup script Source: https://github.com/lnvestor/datapika-examples/blob/main/mcp/README.md Runs the provided shell script to configure Claude Code with the Datapika MCP server. The script offers browser sign-in (option 1) or API token (option 2). ```bash ./mcp/claude-code.sh ``` -------------------------------- ### Node.js client call and list items Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts the actor run and waits for it to finish, then reads rows from the run's default dataset. Use for large runs; each actor README lists input fields and the input schema link shows the rest. ```javascript const run = await client.actor('openclawai/google-maps-scraper').call(input); const { items } = await client.dataset(run.defaultDatasetId).listItems(); ``` -------------------------------- ### Reddit Scraper input JSON (startUrls, maxItems) Source: https://github.com/lnvestor/datapika-examples/blob/main/reddit-scraper/README.md Example input for the Reddit Scraper. startUrls accepts any Reddit URL (subreddit listing, post, user page, or search page); maxItems sets the maximum rows per input (1 to 10,000). ```json { "startUrls": [ "https://www.reddit.com/r/Python/top/?t=week" ], "maxItems": 5 } ``` -------------------------------- ### Add marketplace for older Claude Code Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md For older Claude Code versions, add the marketplace before installing the plugin. ```bash /plugin marketplace add lnvestor/datapika-examples ``` -------------------------------- ### Set Apify API token environment variable Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Export your Apify API token as an environment variable. Required for running examples. ```bash export APIFY_TOKEN= ``` -------------------------------- ### Example input JSON for the scraper Source: https://github.com/lnvestor/datapika-examples/blob/main/google-ads-transparency-scraper/README.md Input configuration used in the examples. queries accepts brand names, domains, advertiser IDs (AR...), or Transparency Center URLs; advertisersPerQuery ranges 1-20, maxAdsPerAdvertiser 1-2,000, and region is a 2-letter country code (empty for worldwide). ```json { "queries": [ "booking.com" ], "advertisersPerQuery": 1, "maxAdsPerAdvertiser": 5, "region": "US" } ``` -------------------------------- ### Run the scraper with curl, Python, or Node.js Source: https://github.com/lnvestor/datapika-examples/blob/main/google-ads-transparency-scraper/README.md Commands to run the scraper from the repository root after initial setup. The curl command writes output synchronously to output.json; the Python and Node.js scripts print one line per row and save every row to output.json. ```bash ./google-ads-transparency-scraper/curl.sh > output.json # curl, synchronous ``` ```bash python google-ads-transparency-scraper/python/run.py # Python, apify-client ``` ```bash node google-ads-transparency-scraper/node/run.mjs # Node.js, apify-client ``` -------------------------------- ### POST /v2/acts/{actorId}/run-sync-get-dataset-items Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts an actor run synchronously, waits for it to finish, and returns the dataset rows in one response. Use this endpoint for small runs that complete within 300 seconds; otherwise, the API returns HTTP 408 and the run continues in the background. ```APIDOC ## [POST] /v2/acts/{actorId}/run-sync-get-dataset-items ### Description Starts an actor run synchronously, waits for it to finish, and returns the dataset rows in one response. Use this endpoint for small runs that complete within 300 seconds; otherwise, the API returns HTTP 408 and the run continues in the background. ### Method POST ### Endpoint https://api.apify.com/v2/acts/{actorId}/run-sync-get-dataset-items ### Parameters #### Query Parameters - **format** (string) - Optional - Response format: json, jsonl, csv, xlsx, xml, html, or rss. - **maxTotalChargeUsd** (number) - Optional - Maximum total charge in USD for the run. #### Request Body - **query** (string) - Required - Search query for the actor. - **maxResults** (number) - Optional - Maximum number of results to return. ### Response #### Success Response (200) - Returns dataset rows in the specified format. #### Error Response (408) - The run took longer than 300 seconds; the run continues and results are stored in the account. ### Request Example ```bash curl -X POST "https://api.apify.com/v2/acts/openclawai~google-maps-scraper/run-sync-get-dataset-items?format=json" \ -H "Authorization: Bearer $APIFY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"query": "coffee shops in Austin, TX", "maxResults": 5}' ``` ``` -------------------------------- ### Input used in the examples Source: https://github.com/lnvestor/datapika-examples/blob/main/trustpilot-reviews-scraper/README.md JSON input for the scraper with companies, maxReviews, and languages. maxReviews is 1 to 20,000; languages are ISO codes, leave empty for every language. ```json { "companies": [ "www.notion.so" ], "maxReviews": 5, "languages": [ "en" ] } ``` -------------------------------- ### Google Flights scraper input JSON example Source: https://github.com/lnvestor/datapika-examples/blob/main/google-flights-scraper/README.md Example input for the scraper. The scripts set date to 30 days from today so the search always looks into the future. Fields include from_airport, to_airport, date, trip, and max_results. ```json { "from_airport": "JFK", "to_airport": "LAX", "date": "YYYY-MM-DD", "trip": "one-way", "max_results": 5 } ``` -------------------------------- ### Actor call (Python SDK) Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts an actor run and waits for it to complete, then retrieves the items from the run's default dataset. Use this method for large runs that may take longer than 300 seconds. ```APIDOC ## Actor call (Python SDK) ### Description Starts an actor run and waits for it to complete, then retrieves the items from the run's default dataset. Use this method for large runs that may take longer than 300 seconds. ### Method call ### Endpoint client.actor("openclawai/google-maps-scraper").call(run_input=run_input) ### Parameters #### Request Body - **run_input** (object) - Required - Input for the actor run. - **max_total_charge_usd** (Decimal) - Optional - Maximum total charge in USD for the run. ### Response - Returns a run object with a `default_dataset_id` attribute. ### Request Example ```python run = client.actor("openclawai/google-maps-scraper").call(run_input=run_input) items = client.dataset(run.default_dataset_id).list_items().items ``` ### Request Example (with spending limit) ```python from decimal import Decimal run = client.actor("openclawai/google-maps-scraper").call( run_input=run_input, max_total_charge_usd=Decimal("1.00"), ) ``` ``` -------------------------------- ### Single-actor MCP URLs for Datapika scrapers Source: https://github.com/lnvestor/datapika-examples/blob/main/mcp/README.md Each URL exposes only fetch-actor-details plus one specific actor, giving an agent a single tool instead of the whole catalog. Replace the actor path to target a different scraper. ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/job-board-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/reddit-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/tiktok-douyin-bilibili-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/trustpilot-reviews-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/meta-ad-library-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/google-ads-transparency-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/google-maps-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/airbnb-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/google-flights-scraper ``` ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/hotel-rental-scraper ``` -------------------------------- ### Actor call (Node.js SDK) Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts an actor run and waits for it to complete, then retrieves the items from the run's default dataset. Use this method for large runs that may take longer than 300 seconds. ```APIDOC ## Actor call (Node.js SDK) ### Description Starts an actor run and waits for it to complete, then retrieves the items from the run's default dataset. Use this method for large runs that may take longer than 300 seconds. ### Method call ### Endpoint client.actor('openclawai/google-maps-scraper').call(input) ### Parameters #### Request Body - **input** (object) - Required - Input for the actor run. - **maxTotalChargeUsd** (number) - Optional - Maximum total charge in USD for the run. ### Response - Returns a run object with a `defaultDatasetId` attribute. ### Request Example ```js const run = await client.actor('openclawai/google-maps-scraper').call(input); const { items } = await client.dataset(run.defaultDatasetId).listItems(); ``` ### Request Example (with spending limit) ```js const run = await client.actor('openclawai/google-maps-scraper').call(input, { maxTotalChargeUsd: 1 }); ``` ``` -------------------------------- ### curl synchronous run with run-sync-get-dataset-items Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Starts a run using the synchronous endpoint, waits for completion, and returns dataset rows in one response. The endpoint waits up to 300 seconds and returns HTTP 408 if the run takes longer; the run continues and results remain in your Apify account. ```bash curl -X POST "https://api.apify.com/v2/acts/openclawai~google-maps-scraper/run-sync-get-dataset-items?format=json" \ -H "Authorization: Bearer $APIFY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"query": "coffee shops in Austin, TX", "maxResults": 5}' ``` -------------------------------- ### Add Datapika MCP server to Claude Code manually Source: https://github.com/lnvestor/datapika-examples/blob/main/mcp/README.md Adds the Datapika MCP server over HTTP transport to Claude Code. Replace with the full config URL from the README. Verify with `claude mcp list` or `/mcp`. ```bash claude mcp add --transport http datapika "" ``` -------------------------------- ### Python client with max_total_charge_usd Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Sets a maximum total charge in USD for a run. The run is not charged more than this amount; it ends when it reaches the limit, and rows collected so far stay in the dataset. ```python from decimal import Decimal run = client.actor("openclawai/google-maps-scraper").call( run_input=run_input, max_total_charge_usd=Decimal("1.00"), ) ``` -------------------------------- ### Add skill via npx Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Add the Datapika skill to any agent that reads SKILL.md files using the npx skills command. ```bash npx skills add lnvestor/datapika-examples ``` -------------------------------- ### Node.js client with maxTotalChargeUsd Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Sets a maximum total charge in USD for a run. The run is not charged more than this amount; it ends when it reaches the limit, and rows collected so far stay in the dataset. ```javascript const run = await client.actor('openclawai/google-maps-scraper').call(input, { maxTotalChargeUsd: 1 }); ``` -------------------------------- ### curl download dataset as CSV Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Downloads a finished run's rows as CSV using the dataset endpoint with format=csv. The synchronous endpoint and dataset endpoint accept format=json, jsonl, csv, xlsx, xml, html, or rss. ```bash curl -H "Authorization: Bearer $APIFY_TOKEN" \ "https://api.apify.com/v2/datasets//items?format=csv" > output.csv ``` -------------------------------- ### Apify MCP config URL for all Datapika actors Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Loads every Datapika actor as a tool through the Apify MCP server. Use this URL when configuring an MCP client. ```text https://mcp.apify.com/?tools=fetch-actor-details,openclawai/job-board-scraper,openclawai/linkedin-jobs-scraper,openclawai/reddit-scraper,openclawai/tiktok-douyin-bilibili-scraper,openclawai/airbnb-scraper,openclawai/career-site-ats-jobs-scraper,openclawai/google-maps-scraper,openclawai/meta-ad-library-scraper,openclawai/google-flights-scraper,openclawai/threads-scraper,openclawai/tiktok-shop-scraper,openclawai/google-ads-transparency-scraper,openclawai/kuaishou-scraper,openclawai/hotel-rental-scraper,openclawai/indeed-ziprecruiter-scraper,openclawai/wechat-scraper,openclawai/youtube-video-scraper,openclawai/trustpilot-reviews-scraper,openclawai/bilibili-scraper ``` -------------------------------- ### Add Datapika MCP server to Claude Code Source: https://github.com/lnvestor/datapika-examples/blob/main/README.md Registers the Datapika MCP server with Claude Code over HTTP transport. On first use, the client opens Apify sign-in in your browser. ```bash claude mcp add --transport http datapika "https://mcp.apify.com/?tools=fetch-actor-details,openclawai/job-board-scraper,openclawai/linkedin-jobs-scraper,openclawai/reddit-scraper,openclawai/tiktok-douyin-bilibili-scraper,openclawai/airbnb-scraper,openclawai/career-site-ats-jobs-scraper,openclawai/google-maps-scraper,openclawai/meta-ad-library-scraper,openclawai/google-flights-scraper,openclawai/threads-scraper,openclawai/tiktok-shop-scraper,openclawai/google-ads-transparency-scraper,openclawai/kuaishou-scraper,openclawai/hotel-rental-scraper,openclawai/indeed-ziprecruiter-scraper,openclawai/wechat-scraper,openclawai/youtube-video-scraper,openclawai/trustpilot-reviews-scraper,openclawai/bilibili-scraper" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.