The Zyte API implements session management, which makes it possible to emulate a browser session when interacting with a site via the API.
This post is not sponsored by Zyte, and I have not received any financial incentive or compensation from Zyte for writing it. The opinions expressed here are entirely my own, based on my experience with their API.
What is a Session?
A session is a set of conditions that are applied to multiple requests. Those conditions will generally include:
- IP address
- cookies and
- headers.
Requests sent from the same session should appear to be part of the same browsing session.
Session Management in the Zyte API
Zyte’s session management offers two approaches to handling sessions:
Client-Managed Sessions
Creating a client-managed session is simple: just provide an unique session ID. All other requests that use the same session ID will be executed in the same session.
Client-managed sessions provide granular session management, making it possible to
- create and manage multiple sessions simultaneously and
- send specific requests through particular sessions.
🚨 Take care when using client-managed sessions in parallel. Parallel requests using the same session ID, where the session doesn’t already exist, may each be assigned a different IP address. It’s best to ensure that the initial request that establishes a session happens in isolation. Then feel free to use the session ID in parallel.
Server-Managed Sessions
In principle server-managed sessions delegate all of the session management to the Zyte API. However, they don’t align well with my existing workflows. I’d be interested to hear from anybody who found this approach preferable to using client-managed sessions.
Conclusion
If you are sending multiple requests to the same site and want to persist state between those requests then session management in the Zyte API is very likely to fit the bill.
If you need help building web crawlers or advice of data acquisition, then get in touch with Fathom Data. The team has over a decade’s experience building bespoke data solutions. As an AWS Partner they can also set up and maintain your cloud infrastructure.


