ScrapeSpace

Writing Prompts

How to write effective prompts that get the data you need.

Be specific about what you want

The agent works best when you tell it exactly what data fields you need. Compare:

Weak promptStrong prompt
Get data from Hacker NewsGet the top 30 stories from Hacker News including title, URL, points, and comment count
Scrape Amazon productsGet the first 20 results for "wireless mouse" on Amazon including product name, price, rating, and number of reviews

Include the target URL when helpful

If you know the exact page, include it:

Go to https://news.ycombinator.com and get the top 30 stories with title, URL, points, and author

If you don't include a URL, the agent will figure out where to go — but being explicit saves time.

Specify pagination

If you need data across multiple pages, say so:

Get all job listings from the first 5 pages of results on Indeed for "data engineer" in "New York"

Without this, the agent may only scrape the first page.

Describe the output structure

The agent returns JSON arrays. If you want specific field names:

Return each result as an object with fields: company_name, job_title, salary_range, location

Tips

  • One task per prompt — don't ask for data from multiple unrelated sites
  • Be explicit about quantity — "top 10", "first 50", "all results on this page"
  • Mention dynamic content — "scroll down to load all results" or "click 'Show More' until all items are visible"
  • Reference visual layout — "the table in the middle of the page" or "the sidebar with pricing tiers"