OpenAI Web Automation avatar

OpenAI Web Automation

Pricing

$60.00 / 1,000 results

Go to Apify Store
OpenAI Web Automation

OpenAI Web Automation

Controls a real browser with an OpenAI model to interact with web pages and extract structured data — no CSS selectors or page-specific scraping code required.

Pricing

$60.00 / 1,000 results

Rating

0.0

(0)

Developer

Tin

Tin

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 hours ago

Last modified

Categories

Share

Automate Web Page Using OpenAI

An Apify Actor that controls a real browser with an OpenAI model to interact with web pages and extract structured data — no CSS selectors or page-specific scraping code required.

You give it a URL, tell it what to do (e.g. "search for xiaomi and click the first result"), and describe what data to extract. The agent takes screenshots at each step, sends them to OpenAI, performs the requested actions, and finally saves the extracted data to a dataset.

Built on Crawlee + Puppeteer and the Apify SDK.


How It Works

  1. The browser opens the Start URL.
  2. The Interaction Prompt is sent to the OpenAI model along with a screenshot.
  3. The model issues browser actions (click, type, scroll, etc.) and the agent executes them — repeating until the task is done or Max Interaction Steps is reached.
  4. A final screenshot and the cleaned page HTML are sent to the model.
  5. The model extracts the data described in Data to Extract and saves it to the dataset.

Each intermediate screenshot is also saved to the key-value store so you can inspect every step the agent took.


Input

FieldTypeRequiredDescription
startUrlsarrayWeb pages to open. Each item must have a url key.
promptstringWhat the AI should do on the page (clicks, searches, form fills, etc.).
expectedOutputstringWhat data to extract from the final page state.
outputSchemaJS functionZod schema function for typed, validated output.
openAiModelstringOpenAI model to use. Default: gpt-5.4.
maxStepsintegerMax browser actions before stopping. Default: 10.
countryCodestringProxy country code (US, DE, VN, FR, GB). Default: US.
proxyConfigobjectAdvanced proxy settings (Apify Residential by default).

Basic Example — eBay Product

{
"startUrls": [{ "url": "https://tradingeconomics.com/" }],
"prompt": "Find the gold price. Close any popup if it appears.",
"expectedOutput": "Extract the gold price."
}

Advanced Example — eBay Search with Typed Schema

{
"startUrls": [{ "url": "https://www.ebay.com" }],
"prompt": "Search by keyword 'xiaomi' and click on the first item in the search results. Close any popup if it appears.",
"expectedOutput": "Extract the title, price and condition of the eBay item.",
"outputSchema": "(z) => z.object({ title: z.string(), price: z.string(), condition: z.string() })",
"maxSteps": 15,
"countryCode": "US"
}

Output

The dataset receives one record per agent step, plus one final record with the extracted data.

Intermediate step record (written after every browser action):

{
"url": "https://www.ebay.com/sch/i.html?_nkw=xiaomi",
"title": "xiaomi items for sale | eBay",
"screenshotSentToOpenAiUrl": "https://api.apify.com/v2/key-value-stores/xxx/records/screenshot_<uuid>.png"
}

Final record (written after extraction is complete):

{
"url": "https://www.ebay.com/p/3072579174?iid=186372216016&var=694422418597",
"title": "Samsung Galaxy S22 - 128 GB - Phantom Black (Unlocked)",
"screenshotSentToOpenAiUrl": "https://api.apify.com/v2/key-value-stores/xxx/records/final_screenshot_<uuid>.png",
"data": {
"title": "Samsung Galaxy S22 - 128GB - Phantom Black (Unlocked)",
"price": "$156.99",
"condition": "Very Good – Refurbished"
}
}

So a run with 5 interaction steps will produce 6 dataset records total (5 step records + 1 final record). The screenshotSentToOpenAiUrl in each record links directly to the screenshot the model saw at that step, letting you replay exactly what the agent did.

Tips

  • Start simple. Use a direct product URL and a short prompt first, then add complexity.
  • Be specific in expectedOutput. The more precise your description, the better the extraction (e.g. "Extract the price as a number without the currency symbol" vs "Extract the price").
  • Use outputSchema when you need consistent field types across many pages — Zod will validate and coerce the model's output.
  • Increase maxSteps for multi-page flows (search → click → detail page needs at least 5–10 steps).
  • Prefer shorter runs. Each Actor startup has overhead; one longer run is more efficient than many short ones.

OpenAI Web Scraper dtrungtin/openai-web-scraper

Epilogue

Thank you for trying my actor. I will be very glad for a feedback that you can send to my email dtrungtin@gmail.com.