PINGDOM_CHECK

#ExtractSummit2026 The world's largest web scraping conference returns. Austin Oct 7–8 · Dublin Nov 10–11.

Register now
Data Services
Pricing
Login
Try Zyte APIContact Sales
  • Unblocking and Extraction

    Zyte API

    The ultimate API for web scraping. Avoid website bans and access a headless browser or AI Parsing

    Ban Handling

    Headless Browser

    AI Extraction

    SERP

    Enterprise

    DocumentationSupport

    Hosting and Deployment

    Scrapy Cloud

    Run, monitor, and control your Scrapy spiders however you want to.

    Coding Agent Add-Ons

    Agentic Web Data

    Plugins that give coding agents the context to build production Scrapy projects. Starts with Claude Code.

  • Data Services
  • Pricing
  • Browse

    • BlogArticles, podcasts, videos
    • Case studiesCustomer outcomes
    • White papersIn-depth reports
    • DocumentationGuides & API reference
    • EventsConferences, webinars, recordings

    Subscribe

    • NewsletterSwiftly delivered
    • Discord communityExtract Data community
  • Product and E-commerce

    From e-commerce and online marketplaces

    Data for AI

    Collect and structure web data to feed AI

    Job Posting

    From job boards and recruitment websites

    Real Estate

    From Listings portals and specialist websites

    News and Article

    From online publishers and news websites

    Search

    Search engine results page data (SERP)

    Social Media

    From social media platforms online

  • Meet Zyte

    Our story, people and values

    Contact us

    Get in touch

    Support

    Knowledge base and raise support tickets

    Terms and Policies

    Accept our terms and policies

    Open Source

    Our open source projects and contributions

    Web Data Compliance

    Guidelines and resources for compliant web data collection

    Join the team building the future of web data
    We're Hiring
    Trust Center
    Security, compliance & certifications
Login
Try Zyte APIContact Sales

Zyte Developers

Coding tools & hacks straight to your inbox

Become part of the community and receive a bi-weekly dosage of all things code.

Join us
    • Zyte Data
    • News & Articles
    • Search
    • Social Media
    • Product
    • Data for AI
    • Job Posting
    • Real Estate
    • Zyte API - Ban Handling
    • Zyte API - Headless Browser
    • Zyte API - AI Extraction
    • Web Scraping Copilot
    • Zyte API Enterprise
    • Scrapy Cloud
    • Solution Overview
    • Blog
    • Webinars
    • Case Studies
    • White Papers
    • Documentation
    • Web Scraping Maturity Self-Assesment
    • Web Data compliance
    • Meet Zyte
    • Jobs
    • Terms and Policies
    • Trust Center
    • Support
    • Contact us
    • Pricing
    • Do not sell
    • Cookie settings
    • Sign up
    • Talk to us
    • Cost estimator
All articles
AI-assisted data extraction28, 28 articles
Data gathering for AI6, 6 articles
Large Language Models (LLMs)24, 24 articles
Tool-assisted coding3, 3 articles
Developer interest143, 143 articles
Integration13, 13 articles
Open-source96, 96 articles
Scraping practice59, 59 articles
Scraping strategy46, 46 articles
Anti-ban35, 35 articles
Traffic6, 6 articles
Web data application25, 25 articles
Web data collection358, 358 articles
Web data collection ethics3, 3 articles
Web data collection legality16, 16 articles
Web scraping APIs63, 63 articles
Zyte API59, 59 articles
Scrapy48, 48 articles
Scrapy Cloud10, 10 articles
Web Scraping Copilot12, 12 articles
AI & Machine Learning1, 1 articles
Automotive2, 2 articles
E-commerce & retail26, 26 articles
Entertainment & Streaming2, 2 articles
Financial Services8, 8 articles
Government2, 2 articles
Market Research & Intelligence3, 3 articles
Media & publishing8, 8 articles
Real Estate2, 2 articles
Recruitment & HR3, 3 articles
Transportation & Logistics2, 2 articles
Travel & hospitality2, 2 articles
Extract Summit25, 25 articles
PyCon1, 1 articles
Large language model23, 23 articles
MCP3, 3 articles
iPaaS2, 2 articles
Python95, 95 articles
Web Scraping Industry Report10, 10 articles
Extract Data podcast1, 1 articles
Zyte Learning Centre1, 1 articles
Zyte YouTube channel1, 1 articles
Zyte blog398, 398 articles
16:9 video4, 4 articles
Article392, 392 articles
Guide1, 1 articles
Build-through2, 2 articles
Curated digest1, 1 articles
Insight and analysis26, 26 articles
Perspective18, 18 articles
Perspectives multi2, 2 articles
Product announcement3, 3 articles
Product demo1, 1 articles
Product update1, 1 articles
Recap3, 3 articles
Research results1, 1 articles
Tutorial7, 7 articles
Viewpoint4, 4 articles
Viewpoint4, 4 articles
Insight and analysis26, 26 articles
Build-through2, 2 articles
Product announcement3, 3 articles
Recap3, 3 articles
Curated digest1, 1 articles

Appearance

Discord Community
BlogWeb ScrapingMaking Your First Zyte API Request
VideoWeb Scraping

Making Your First Zyte API Request

December 18, 2025
J

John Rooney

December 18, 2025

Full transcript

In this video, I'm going to show you how to make your first request with the Z API, and we'll talk about three of the main features that I like the most and that I use the most often. So, I have a blank Python project in front of me. I've got my virtual environment set, and I have installed requests. So, let's import in what we need. So, I'm going to import requests, and I'm also going to import in um OS, which I need, and I'm also going to import in from rich, we're going to import in print. These two are relevant to what I'm doing right now. You probably don't need them. OS is because I have my uh API key stored in an environment variable on my machine. And rich is because what I print out to show you what's coming out of the program, you'll be able to see it a bit nicer. Next thing I'm going to do is I'm just going to set my API key here. So I'm going to say API key is equal to os.getv again because this is stored in my virtual environment on my machine. Uh, and I'm just going to do a quick uh if not API key uh will just raise an exception. This just means that uh if it doesn't find the API key on my machine, it will raise this exception and program will stop. Uh this is probably not relevant to you. Although I would recommend that you store your API key securely, safely in your environment and call it in in a way like this rather than pasting it directly into your code. So now we need to make the request. So this is going to be response is going to equal to requests.post. You need to make a post request to our API. Then we need to give the URL which is http and then it is api.zite.com/v1/ extract like this. That will always be the same for every request. So you can make that a constant if you wanted to. And then we need to authenticate. So our orth is going to be equal to uh and this is where we put our API key. So if you were pasting your API key directly in it would be API key would go here like this. And this needs to be a tupole. However, mine's come from my virtual environment. So, I'm just going to put in the API key variable that I created above. From here, we need to add in a JSON body. So, this is going to be the information for the website and the parameters that we want. So, the first one is obviously the URL. Without a URL, we can't really do anything. So, I'm going to paste in my URL here. And then I'm going to put in HTTP response body. And this is going to be equal to true. This is telling the API that I want the HTML for this and I want it as a plain request and there needs to be a comma there. And that's it. That is the basics of the request itself. Now, there's lots of different parameters you can put in here and we'll talk about a couple more in a minute. U but what I want to do now is I just want to print out the response body for you because I need to show you that when you use HTTP response body, it comes back encoded. So, I'm going to print response.json like so. I'm going to save this and I come over to my other terminal and we're going to run it. UV run main.py assuming I haven't done anything wrong. I should get a load of information back in just a second. There we go. Now you can see here that this is a load of um just random characters and that's because this is base 64 encoded. What that means is we need to decode this when we call it with the HTT with the HTTP response body. Now we can do that very easily in Python. It has its own Python package in the standard library. So we'll do from B 64. We're going to import in B64 decode. Now I can come back to my response. And I'm going to say that the HTML is going to be equal to uh B64 decode on our response.json. And within this response, I want to decode just the HTML part because the rest of it isn't encoded. So I'm going to say HTTP response uh body like so. And this means now we have a bite bytes representation of the HTML. So I can print this out. Print HTML. And I'm only going to print out the first I don't know 400 characters or something like that. So let's save, clear this up, and run again. Now we should be able to see the actual HTML or the first 400 odd characters of it which we have there. Now it's this HTML here which we could then pass out however you want to. Whether you want to use beautiful soup, lxml or parcel or any other HTML parser, this is done here for you. What's worth noting though is that with this one post request that we have made, we have negated the need for us to find any proxies. This API is going to do it all for us. We don't need to worry about the website blocking us in any way, shape or form. That's all handled by the Zite API. So, it's going to make our lives so much easier because we don't have to worry about any of that. But what you might want to do is you might want to actually use a headless browser to render this out for you. Maybe the website that you want is very JavaScript heavy or maybe it just needs JavaScript to run on its own at all. So what we can do here is just change this parameter to browser HTML is equal to true. Now when we do this, we don't need to decode the HTML because it's going to come back to us in a string. So we can just do response.json and then ask for the browser browser HTML like so. Now I'm going to save and we'll come back, clear this up and we'll run again. Now obviously because we're asking for a browser to be spun up to to get this, it's going to take a little bit longer. But what you will be able to do when you actually make projects out of this is not only be able to call this asynchronously. So you have multiple requests going at the same time. You'll also be able to reuse sessions um and you know hold on to IPs which will speed the whole thing up greatly. So there we are. We have the HTML or the start of it. There you can't really tell what it is here but it is the start of the HTML. actually don't really need to print out the whole thing. Um, that's it. And it's rendered through the browser that we've spun up in the background on our system for you. No need for you to worry about installing any extra dependencies. No need to worry about whether playright will work or whether it will be stable or whether it's going to work on the server that you're using. None of that. Just that one line will do it all for you. The last thing I want to show you is the auto extract we have where you can actually tell the API that it this page is a certain type of page and it will use the ML model behind the scenes to extract data from that page in a set schema and return it to you in JSON format. So this is going to negate the need for you to do any HTML passing. And obviously whilst there is a slight more cost associated to this, it makes it very very easy to integrate this into any other system because you know JSON is easy to pass around and almost any language can pass it. So what we're going to do is we're just going to get rid of this and we're going to put the word product here because I know that this is a product page. So I can tell the system I can tell the API rather that hey this is a product page. Give me the data back as a product schema and it will return the information. It will give you a probability. but it's very good at doing it. It's very good at recognizing product pages and understanding where information is and how to get that out. So, I'm going to comment these out because we don't need them. And we're going to do uh print out our response uh response.json. And within this response now, there is a product key like so. So, we save and we're going to come out of here. We're going to clear this up and we're going to run this again. And now we're going to see that when this comes back to us, it's going to have that default schema with all of those common uh data points from the website scrape pulled out for us. And if I turn this into scroll mode and go up, we can see here is a load of product information already. That's the description. There's the the um name, price, uh uh regular price, currency, availability, skew. All of this information has been uh passed out for you by default. Now, there will be cases where maybe this will miss things and I'll show you in a further video how you can actually adjust that. But I really wanted to show you how easy it is to just make one simple request like this with a URL and product is equal to true and to get that JSON data back that you can then push AC push around your system or do whatever you need to. Again, don't have to worry about running proxies, a browser, nothing like that. It's all handled for you with one request. It is worth noting though that when you do it like this, it will default to using browser rendering. Uh you can change it. So you will you can render off of the HTTP response body just by changing some extra parameters. There's product options I think is one of them. And you can tweak it that way too. So what I would recommend you do is go ahead and check out the documentation and have a look around. Get your API key. Go and use the playground and then see where you're at. check out the websites that you want to scrape and see how that works and go ahead and start to build out your first requests like I've done here and start getting that data from the web that you need. So, there'll be links to all of this in the description below. Thank you very much for watching and subscribe because there's going to be a lot more content like this coming up showing you the best way to web scrape using the Zite API.

Follow

Get the latest

Zyte and the data web in your inbox — or wherever you already are.

Subscribe

Or follow elsewhere

The Community · Newsletter

The best of Zyte and the data web, in your inbox.

One curated edition — new articles, product updates, and the stories shaping the data web. No noise.

More videos

AI generated these Scrapy projects - why I won't ship them▶
Video

AI generated these Scrapy projects - why I won't ship them

Screenshot webpages with this Claude Skill and Zyte API▶
Video

Screenshot webpages with this Claude Skill and Zyte API

0% Hallucination? RAG + Web Scraping (Step-by-Step)▶
Video

0% Hallucination? RAG + Web Scraping (Step-by-Step)

G2.com

Capterra.com

Proxyway.com

EWDCI logoMost loved workplace certificateZyte rewardISO 27001 iconG2 rewardG2 rewardG2 reward

© Zyte Group Limited 2026