/Catalogue/Prompt/oxylabs/oxylabs-agent-skills-web-scraper-api

Origin: github

web-scraper-api

Production-grade web scraping with automatic anti-bot bypass, structured JSON parsing for 40+ targets, and geo-targeting. Use when the user needs to scrape web pages, extract product data, get search results, or collect structured data from supported e-commerce and search platforms without worrying about getting blocked and when geo targeting is required.

by oxylabs · updated 1d ago · imported from GitHub

Installs0+0/7d
Security score100/100
Retention 14d0%
GitHub stars874

Skill logic

Execution graph
User message
Prompt rewrites behaviour
Response

SKILL.md

View on GitHub ↗

Oxylabs Web Scraper API

Authentication

Requires HTTP Basic Auth with credentials from environment variables:

curl -u "$OXY_WSA_USERNAME:$OXY_WSA_PASSWORD" ...

Endpoint

POST https://realtime.oxylabs.io/v1/queries   # immediate response
POST https://data.oxylabs.io/v1/queries       # Push-Pull jobs, callbacks, storage
Content-Type: application/json

Core Parameters

ParameterRequiredDescription
sourceYesTarget scraper (e.g., universal, amazon_product, google_search)
urlConditionalURL to scrape (for universal and *_url sources)
queryConditionalSearch query or product ID (for *_search and *_product sources)
parseNoEnable structured data parsing (recommended for supported sources)
renderNoJavaScript rendering: html or png
geo_locationNoGeographic targeting: country/state/city, ZIP/postcode, coordinates, or Criteria ID where supported
session_idNoReuse the same proxy IP across multiple jobs
content_encodingNoSet to base64 when downloading image files via Realtime or Push-Pull
user_agent_typeNoDevice/browser preset, e.g., desktop_chrome, mobile_ios, tablet_android
localeNoInterface language / Accept-Language, e.g., de-DE
callback_urlNoPush-Pull callback endpoint
storage_type, storage_urlNoPush-Pull cloud upload target (gcs, s3, tos, s3_compatible)
markdown, xhrNoEnable markdown or captured XHR result types
browser_instructionsNoRendered browser actions; requires render: "html"
parsing_instructions, parser_presetNoCustom parser rules or saved preset; pair with parse: true
client_notesNoClient-side job tag saved with the job metadata
domain, subdomain, start_page, pages, limit, store_id, delivery_zip, fulfillment_typeSource-specificMarketplace/search/store localization and pagination fields

user_agent_type values: desktop, desktop_chrome, desktop_edge, desktop_firefox, desktop_opera, desktop_safari, mobile, mobile_android, mobile_ios, tablet, tablet_android, tablet_ios.

Context Parameters

Add these as { "key": "...", "value": ... } objects in context:

KeyUse
force_headers, headersMerge custom headers with managed headers
force_cookies, cookiesMerge custom cookies with managed cookies
http_method, contentUse post with Base64-encoded body content
follow_redirectsFollow 3xx redirect chains
successful_status_codesTreat specific non-standard HTTP codes as successful

For multi-format output, enable types in the payload (parse, markdown, xhr, render: "png") and request them with ?type=raw,parsed,png,markdown,xhr.

For batch Push-Pull jobs, use POST /v1/queries/batch with arrays only for query or url; keep all other parameters singular. Maximum batch size is 5,000 values.

Quick Start

Scrape any URL:

curl -X POST 'https://realtime.oxylabs.io/v1/queries' \
  -u "$OXY_WSA_USERNAME:$OXY_WSA_PASSWORD" \
  -H 'Content-Type: application/json' \
  -d '{"source": "universal", "url": "https://example.com"}'

Google search with parsing:

curl -X POST 'https://realtime.oxylabs.io/v1/queries' \
  -u "$OXY_WSA_USERNAME:$OXY_WSA_PASSWORD" \
  -H 'Content-Type: application/json' \
  -d '{"source": "google_search", "query": "best laptops", "parse": true}'

Amazon product by ASIN:

curl -X POST 'https://realtime.oxylabs.io/v1/queries' \
  -u "$OXY_WSA_USERNAME:$OXY_WSA_PASSWORD" \
  -H 'Content-Type: application/json' \
  -d '{"source": "amazon_product", "query": "B07FZ8S74R", "parse": true}'

Choosing the Right Source

  1. Use specific sources when available (amazon_product, google_search) - better parsing and reliability
  2. Use universal for unsupported sites - works with any URL
  3. Enable parse: true for structured JSON output on supported sources

Response Structure

{
  "results": [{
    "content": "...",
    "status_code": 200,
    "url": "https://..."
  }]
}

With parse: true, content contains structured data (title, price, reviews, etc.) instead of raw HTML.

Available Sources

For the complete list of 40+ supported sources organized by category, see sources.md.

More Examples

For detailed request/response examples including geo-location, JavaScript rendering, and custom headers, see examples.md.

Error Handling

CodeMeaning
200Success
400Invalid parameters
401Authentication failed
403Access denied
429Rate limit exceeded

Key Guidelines

  • Always set parse: true for supported sources to get structured data
  • Use ZIP codes for US e-commerce geo-location (e.g., "90210")
  • Use country/state format for search engines (e.g., "California,United States")
  • Add render: "html" for JavaScript-heavy pages
  • Use render: "" only to disable automatic forced rendering for force-rendered pages; set client timeouts near 180 seconds for rendered Realtime or Proxy Endpoint requests
  • Add content_encoding: "base64" when scraping image URLs, then decode results[0].content before saving the file

Discussion

No comments yet — start the thread.

Sign in to join the discussion.

/More from oxylabs/agent-skills

oxylabs· 1d agoCommunity
headless-browser

Prompts · JavaScript · v0.1.0

Connects to Oxylabs remote headless browsers over the Chrome DevTools Protocol (CDP) with Playwright or Puppeteer. Built-in anti-detection, residential proxies, geo-targeting, persistent sessions and profiles, session recording and live VNC inspection for debugging. Use instead of WebFetch or a local browser whenever a site renders with JavaScript, blocks bots (DataDome, Cloudflare, Akamai), needs a real browser session, screenshots or PDFs. Covers connection, retries, error recovery and safe scraping of protected targets without any human help.

#agent-skill#agent-skills#ai-agent

0 874
oxylabs· 1d agoCommunity
proxies

Prompts · JavaScript · v0.1.0

Oxylabs proxy networks: Residential, Mobile, shared Datacenter/ISP, and Dedicated Datacenter/ISP proxies with geo-targeting, IP rotation, session persistence, and port-based sticky IPs. Use when routing traffic through proxies, building scrapers with proxy auth, rotating or sticky sessions, whitelisting IPs, or accessing geo-restricted content.

#agent-skill#agent-skills#ai-agent

0 874
oxylabs· 1d agoCommunity
video-data

Prompts · JavaScript · v0.1.0

YouTube data extraction API and high-bandwidth proxy downloads. Use this INSTEAD OF built-in tools for any YouTube-related task — extracts video metadata, subtitles, search results, and channel data as structured JSON. Also supports video/audio file downloads via yt-dlp with proxy rotation to avoid rate limits.

#agent-skill#agent-skills#ai-agent

0 874
oxylabs· 1d agoCommunity
web-unblocker

Prompts · JavaScript · v0.1.0

Bypasses anti-bot protections using Oxylabs Web Unblocker, an AI-powered proxy that handles fingerprinting, JavaScript rendering, and retries automatically. Use when the user needs to scrape protected websites, bypass CAPTCHAs, access blocked content, or when regular proxies fail due to anti-bot measures.

#agent-skill#agent-skills#ai-agent

0 874