Quick Start: Web API
Get from an API key to your first Oxylabs Web API search and scrape in just five minutes.
Oxylabs Web API gives your application or your AI agent two things the open web makes surprisingly hard: finding the right, fresh pages, and extracting their data reliably. One endpoint searches the live web and the other scrapes any page (rendering JavaScript and handling access challenges) and hands back clean data ready for use.
One page as Markdown, HTML, JSON or a screenshot
You know the URL and need what's on it
They are designed to be used together: search to find, scrape to extract. This quick start guide covers:
Manual integration – your own code calling the API directly.
Easy AI integration – using the Web API through a proprietary or your custom AI agent.
Setup & API key
Create an account: Sign up at the Oxylabs Dashboard.
Add a product instance: Click + Add product instance and select Web API in the Web access category.
Set up: Choose the instance name, product usage limits (optional), and create the instance.
Get credentials: Click on the Web API instance in the dashboard home instance table and get your API key.
Export your API key into your project environment (e.g. your OS terminal or the CLI terminal in the project workspace):
export OXYLABS_WEB_API_KEY=your_api_key_hereWeb API integration
Plugging this into an AI agent?
Skip to AI agent integrations to start using it with one command.
Building your own custom integration?
Start the manual integration below.
Manual integration
Depending on your data needs, you can use the Web API endpoints separately for web search, scraping, or as full data collection and delivery pipeline.
Full pipeline (search-to-scrape)
outline found in /search is a list of truncated snippets and often not useful for advanced use cases or AI workflows.
To get structured data from a single query, search the web with /search for relevant data according to your query and pass the result URL to /scrape for data retrieval. Here's a full working Python example:
AI agent integration
Oxylabs Web API is designed for easy AI agent workflows using Agent Skills, MCP (Model Context Protocol) or simple one-prompt integrations. Once you have your API key, choose the integration method.
One-page integration prompt – paste a prompt into a coding agent and have it build a custom integration for you.
If you want an AI coding assistant (like Claude Code, Cursor, or Copilot) to build an integration for you, paste the following prompt:
See a full example and learn more about Web API integration in the documentation.
Agent skills – installs the knowledge on how to use the API, no running server required.
Add official agent skills that teach your AI agent how to search, scrape, cite sources, and handle web research through Oxylabs Web API using the following terminal command:
Now your agent knows all there is to know about Oxylabs Web API and how to use it. To learn more about Web API agent skills, see our documentation.
MCP server – typed tools for search, scrape, and dedicated scrapers for any MCP client.
Connect to or self-host our official MCP server to expose Web API search, scrape, and extract tools directly to Claude Code, Cursor, or your custom AI agent.
For easiest implementation, add the server to your client by pointing your agent to the Oxylabs-hosted server – https://mcp.oxylabs.io/web-api-mcp:
To learn more about Web API MCP integration or how to self-host the official Oxylabs server server, see MCP servers.
Essential parameters
/search
query
string
Search keyword or phrase
max_results
integer
Number of organic search results to return (1-20)
location
string
2-letter country code (e.g., "DE", "US") for localized search
/scrape
url
string
URL to scrape
output
array
Formats to return: "html" (default), "markdown", "json", "screenshot"
json
object
Used for custom AI parsing through prompt or schema
location
string
2-letter country code (e.g., "DE", "US"). Some dedicated scrapers use a different format. See Dedicated Scrapers.
run_js
boolean
Renders the page in a real browser before capturing content. Slower, use a client timeout of 150s or more.
device
string
Device emulation: "desktop" (default) or "mobile".
Common response codes
200 / 202
Success. Realtime / async job accepted
–
400
Malformed request
No, fix the field named in errors[].pointer.
401
Authentication error (bad or missing API key).
No, check the key on your Web API instance
429
Rate limit or spent quota
Rate limit: yes, with backoff. Quota: no.
5xx
Upstream failure or failed to scrape
Yes, up to ~3 attempts with backoff.
See all response codes to learn about all status codes and find troubleshooting tips.
Next steps
Want the full picture of the product? See the Web API documentation.
Building your first custom requests? Prototype faster with Web API Playground.
Need data from a specific site? Check out all Web API Dedicated Scrapers.
Want structured JSON from any page? Try Web API's built-in AI Parsing.
Scraping at volume or delivering to cloud storage? Learn more about available Delivery Modes.
Want an AI agent to use the Web API without you writing code? Try official Oxylabs MCP server or Agent Skills.
Last updated
Was this helpful?