LogoLogo
Nimble HomeLoginCreate an Account
  • Home
  • Quick Start Tutorials
    • Tutorial Library
      • Track SEO and SEM Ranking
      • Reddit as a Guerilla Marketing Strategy
  • Nimble Platform
    • Nimble Platform Overview
    • Online Pipelines
      • Supermarkets
        • ASDA
        • Tesco Groceries
        • Sainsbury’s
        • Morrisons
      • eCommerce
      • Restaurants
        • Yelp
        • Tabelog
        • Uber Eats Japan
        • Demaecan
        • Uber Eats US
      • Real Estate
        • Zillow
  • Nimble SDK
    • SDK Overview
    • Web API
      • Web API Overview
      • API Product Specs
      • Nimble Web API Quick Start Guide
        • Introduction
        • Nimble APIs Authentication
        • Real-time URL request
        • Delivery methods
        • Batch processing
        • Response codes
        • FAQs
      • Nimble Web API Functions
        • Realtime, Async & Batch Request
        • Geo Location Targeting
        • Javascript Rendering
        • Page Interaction
          • Wait (delay)
          • Wait for Selector
          • Wait and Click
          • Wait and Type
          • Scroll
          • Scroll to
          • Infinite Scrolling
          • Capturing Screenshots
          • Collecting Cookies
          • Executing HTTP Requests
          • Operation Reference
        • Network Capture
          • Filter by URL Matching
          • Filter By Resource Type
            • Real World Demo: Capturing Ajax Requests
          • Wait for Requests
          • Capturing XHR without Rendering
          • Operation Reference
        • Data Parsing
          • Parsing Templates
          • Merge Dynamic Parser
        • Custom Headers & Cookies
        • General Params
      • Vertical Endpoints
        • SERP API
          • Real-time search request
          • Getting local data
          • Browsing SERP pagination
          • Delivery methods
          • Batch Processing
          • Endpoints and Response Codes
        • Maps API
          • Searching for places
          • Getting information about a place
          • Collecting reviews
          • Delivery methods
          • Batch processing
          • Endpoints and Response Codes
    • Web Retrieval API
      • Web Retrieval API Overview
    • Proxy API
      • Nimble IP Overview
      • Nimble IP Quick Start Guide
        • Send a request
        • Nimble IP Autentication
        • Geotargeting and session control
        • Response codes
        • FAQs
      • Nimble IP Functions
        • Country/state/city geotargeting
        • Controlling IP rotation
        • Geo-sessions: longer, stickier, more accurate sessions
        • Using IPv6 Proxies
        • Response Codes
      • Integration Guides
        • Incogniton
        • Kameleo
        • VMLogin
        • AdsPower
        • FoxyProxy
        • Android
        • Multilogin
        • iOS
        • SwitchyOmega
        • Windows
        • macOS
        • Proxifier
        • MuLogin
        • Puppeteer
        • Selenium
        • Scrapy
    • Client Libraries
      • Installation
      • Quick Start
    • LangChain Integration
  • Technologies
    • Browserless Drivers
      • API Driver-Based Pricing
    • IP Optimization Models
    • AI Parsing Skills
  • Management Tools
    • Nimble Dashboard
      • Exploring the User Dashboard
      • Managing Pipelines
      • Reporting and Analytics
      • Account Settings
      • Experimenting with the Playground
      • Billing and history
    • Nimble Admin API
      • Admin API basics
      • Admin API reference
  • General
    • Onboarding Guide
      • Getting started with Nimble's User Dashboard
      • Nimble IP Basics
      • Nimble API Basics
      • Helpful Resources
    • FAQs
      • Account Settings and Security
      • Billing and Pricing
      • Tools and Integrations
      • Nimble API
      • Nimble IP
    • Deprecated APIs
      • E-commerce API
        • E-commerce API Authentication
        • Real-time product request
        • Real-time product search request
        • Delivery methods
        • Batch Processing
        • Endpoints and Response Codes
      • Unlocker Proxy Overview
        • Unlocker Proxy Quick Start Guide
          • Real-time request
          • FAQs
        • Unlocker Proxy FAQ
Powered by GitBook
On this page
  • get_cookies Functions
  • Example Request
  • Example Response
  1. Nimble SDK
  2. Web API
  3. Nimble Web API Functions
  4. Page Interaction

Collecting Cookies

get_cookies Functions

Websites may set cookies for a variety of purposes, from identifying returning users to storing user preference information.

Capturing and saving the cookies a website sends is easily done with Page Interactions using the get_cookies function. get_cookies accepts a timeout parameter to set how long to listen for new cookies, as demonstrated below:

Parameter
Required
Description

timeout

Optional Default = 1000

Integer | Controls how long to wait for new cookies before storing all collected cookie data in ms.

Example Request

curl -X POST 'https://api.webit.live/api/v1/realtime/web' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://www.example.com",
    "render": true,
    "render_flow": [{
        "get_cookies": {
                "timeout": 1000
        }
    }]
}'

Like all Page Interactions, infinite scrolling is capped by the global 120-second session timeout, and will be terminated if this limit is reached.

Example Response

get_cookies returns an array of cookies with a variety of relevant metadata, as shown in the example below:

...
"render_flow": {
        "success": true,
        "results": [
            {
                "name": "get_cookies",
                "status": "done",
                "duration": 2,
                "result": [
                    {
                        "name": "AEC",
                        "value": "AQTF6HyAslt2IuPBg9jwM2zCXxNUpsNKGgNwuplQWREeFgCJ5xXjYer98As",
                        "domain": ".google.com",
                        "path": "/",
                        "expires": 1733227086.667467,
                        "size": 62,
                        "httpOnly": true,
                        "secure": true,
                        "session": false,
                        "sameSite": "Lax",
                        "priority": "Medium",
                        "sameParty": false,
                        "sourceScheme": "Secure",
                        "sourcePort": 443
                    },
                    {
                        "name": "receive-cookie-deprecation",
                        "value": "1",
                        "domain": "www.google.com",
                        "path": "/",
                        "expires": 1733227086.667547,
                        "size": 27,
                        "httpOnly": true,
                        "secure": true,
                        "session": false,
                        "sameSite": "None",
                        "priority": "Medium",
                        "sameParty": false,
                        "sourceScheme": "Secure",
                        "sourcePort": 443,
                        "partitionKey": "https://google.com"
                    },
                    {
                        "name": "NID",
                        "value": "514=lxnGqrzAmosD7_7PmQUW-pU4qmlkut0tglTMPm3_T98VEVTulM6PgQWJW8RA4ayo0GKh3pIEP4cOET0JOn56PR2-rPD9nSrNzD_uKid8WQ3s_-WNjXpGs68BFpqHCRRnwG9OZBMi3NeGUYe2gE7pmIL1mkV_ryQDDcgcicdlthU",
                        "domain": ".google.com",
                        "path": "/",
                        "expires": 1733486286.667576,
                        "size": 178,
                        "httpOnly": true,
                        "secure": true,
                        "session": false,
                        "sameSite": "None",
                        "priority": "Medium",
                        "sameParty": false,
                        "sourceScheme": "Secure",
                        "sourcePort": 443
                    }
                ]
            }
        ]
    }
PreviousCapturing ScreenshotsNextExecuting HTTP Requests

Last updated 8 months ago