What Apify taught us about publishing scrapers
Seven things we learned about publishing on the Apify Store: the automated tester, identity checks, rate-limited visibility changes, pay per result and the first "users".
Writing the scraper is the easy half. This is what we learned about putting one in front of people on the Apify Store.
1. The first user is a robot#
Apify runs an automated test of every public actor with its default input. It has to finish fast with at least one row, or the actor gets marked for maintenance and, later, deprecated. So the default input is small, safe and boring on purpose.
A related warning: the first "users" of a new public actor are mostly that tester. Early run counts are not demand, and we do not quote them.
2. Identity and payout come before price#
Publishing to the Store needs a verified developer identity. Charging needs payout details first. Decide the price before the actor goes public, not after.
3. Visibility changes are rate limited#
Going from private to public is limited per day. It is not in the docs; the API tells you when you hit it. Release in batches, and keep a way to stop an actor at once if a site asks or it misbehaves: a tiny build that collects nothing can replace the real one immediately.
4. Residential proxy is a paid, metered feature#
Billed by traffic. Block images, media and fonts in browser runs and use the ladder from the proxy post.
5. Pay per result means one row is one charge#
Every pushed row is a result. The platform caps it at the buyer's spending limit and tells the run when the limit is reached, so the run can stop cleanly instead of failing halfway. This is the loop we use.
import time
from dataclasses import asdict
from apify import Actor
async def main():
async with Actor:
inp = await Actor.get_input() or {}
max_items, pushed = int(inp.get("maxItems", 100)), 0
deadline = time.time() + 55 * 60 # finish with what we have instead of being cut off
async for product in crawl(inp["startUrls"]): # yields Product records, robots-checked
if pushed >= max_items or time.time() > deadline:
break
res = await Actor.push_data(asdict(product)) # one row = one charged result
pushed += 1
if getattr(res, "event_charge_limit_reached", False):
break # the buyer's spending limit: stop, do not fail
await Actor.set_status_message(f"Done: {pushed} results")Pay per result is also the honest model for scraping: a buyer pays for rows delivered, not for the time a run took.
6. Store text has hard limits#
Title, SEO title and SEO description all have length caps. Short, plain and honest beats keyword stuffing, and it reads better in a search result.
7. Plan for the day the site changes#
Every actor has a default input that has to work, and a daily check. A site change means a rebuild, not a shrug.
written
14 min readGoogle Maps scraper in Python: 120 places a search, phones in the data, no review counts
A Google Maps search lists 120 places and stops. Signed out, most cards show no phone and almost none a review count, but the JSON the page loads has a phone for 65 to 100 % of the places. How to read it with Playwright within robots.txt, and what to clean before it goes into a CSV.
8 min readInstahyre API in Python: skills, experience and company size of Indian jobs
Instahyre job pages fill their lists from a JSON search that needs no login. We read 240 postings for Python, React, data engineer and sales: the skills they ask for, the years of experience, the size of the employer, how many are remote and how old they are. How to read it, and the traps.
6 min readjobs.ch jobs in Python: the workload is a range, and the start date is not a start date
A jobs.ch search page carries its 20 jobs as data. Half or more give the workload as a range, 80 to 100 % most often. The job pages add structured data for search engines, but it seldom has a pay figure and a start date that is the posting date plus 30 days. How to read both, and what to keep.