Documentation
¶
Overview ¶
Package steel provides a client for the API.
Steel API client
Index ¶
- type APIConnectionError
- type APIError
- type APITimeoutError
- type AuthenticationError
- type BadRequestError
- type CaptchaSolveImageParams
- type CaptchaSolveImageResponse
- type CaptchaSolveParams
- type CaptchaSolveResponse
- type CaptchaState
- type CaptchaStatusResponse
- type ClickMouse
- type Client
- func (c *Client) Pdf(ctx context.Context, body ClientPdfParams, opts ...RequestOption) (*PdfResponse, error)
- func (c *Client) Scrape(ctx context.Context, body ClientScrapeParams, opts ...RequestOption) (*ScrapeResponse, error)
- func (c *Client) Screenshot(ctx context.Context, body ClientScreenshotParams, opts ...RequestOption) (*ScreenshotResponse, error)
- type ClientPdfParams
- type ClientScrapeParams
- type ClientScreenshotParams
- type ComputerActionRequestVariant0Action
- type ComputerActionRequestVariant1Action
- type ComputerActionRequestVariant1Button
- type ComputerActionRequestVariant1ClickType
- type ComputerActionRequestVariant2Action
- type ComputerActionRequestVariant3Action
- type ComputerActionRequestVariant4Action
- type ComputerActionRequestVariant5Action
- type ComputerActionRequestVariant6Action
- type ComputerActionRequestVariant7Action
- type ComputerActionRequestVariant8Action
- type ConflictError
- type Content
- type Context
- type Cookie
- type CookiePartitionKey
- type CreateSessionRequestDeviceConfigDevice
- type CreateSessionRequestSessionContextCookiesItemPriority
- type CreateSessionRequestSessionContextCookiesItemSameSite
- type CreateSessionRequestSessionContextCookiesItemSourceScheme
- type Credential
- type Credential2
- type CredentialCreateParams
- type CredentialCreateResponse
- type CredentialDeleteParams
- type CredentialDeleteResponse
- type CredentialListParams
- type CredentialListResponse
- type CredentialUpdateParams
- type CredentialUpdateResponse
- type Credentials
- type CredentialsResource
- func (r *CredentialsResource) Create(ctx context.Context, body CredentialCreateParams, opts ...RequestOption) (*CredentialCreateResponse, error)
- func (r *CredentialsResource) Delete(ctx context.Context, body CredentialDeleteParams, opts ...RequestOption) (*CredentialDeleteResponse, error)
- func (r *CredentialsResource) List(ctx context.Context, params CredentialListParams, opts ...RequestOption) (*CredentialListResponse, error)
- func (r *CredentialsResource) Update(ctx context.Context, body CredentialUpdateParams, opts ...RequestOption) (*CredentialUpdateResponse, error)
- type CursorPage
- type CursorPageAutoPager
- type Data
- type DebugConfig
- type DebugConfig2
- type DetailsResponse
- type DeviceConfig
- type DeviceConfig2
- type Dimensions
- type Dimensions2
- type Dimensions3
- type Dimensions4
- type Dimensions5
- type Dimensions6
- type Dimensions7
- type DragMouse
- type ErrorResponse
- type Event
- type Extension
- type Extension2
- type ExtensionDeleteAllResponse
- type ExtensionDeleteResponse
- type ExtensionListResponse
- type ExtensionUpdateParams
- type ExtensionUpdateResponse
- type ExtensionUploadParams
- type ExtensionUploadResponse
- type Extensions
- func (r *Extensions) Delete(ctx context.Context, extensionID string, opts ...RequestOption) (*ExtensionDeleteResponse, error)
- func (r *Extensions) DeleteAll(ctx context.Context, opts ...RequestOption) (*ExtensionDeleteAllResponse, error)
- func (r *Extensions) Download(ctx context.Context, extensionID string, opts ...RequestOption) (*FileUpload, error)
- func (r *Extensions) List(ctx context.Context, opts ...RequestOption) (*ExtensionListResponse, error)
- func (r *Extensions) Update(ctx context.Context, extensionID string, body ExtensionUpdateParams, ...) (*ExtensionUpdateResponse, error)
- func (r *Extensions) Upload(ctx context.Context, body ExtensionUploadParams, opts ...RequestOption) (*ExtensionUploadResponse, error)
- type File
- type FileUpload
- type FileUploadParams
- type FileUploadParams2
- type Files
- func (r *Files) Delete(ctx context.Context, path string, opts ...RequestOption) (*interface{}, error)
- func (r *Files) Download(ctx context.Context, path string, opts ...RequestOption) ([]byte, error)
- func (r *Files) List(ctx context.Context, opts ...RequestOption) (*Fileslist, error)
- func (r *Files) Upload(ctx context.Context, body FileUploadParams, opts ...RequestOption) (*File, error)
- type Fileslist
- type Fingerprint
- type Fingerprint2
- type Fingerprint3
- type FingerprintFingerprint
- type FingerprintFingerprint2
- type FingerprintFingerprint3
- type FingerprintFingerprintBattery
- type FingerprintFingerprintBattery2
- type FingerprintFingerprintBattery3
- type FingerprintFingerprintMultimediaDevices
- type FingerprintFingerprintMultimediaDevices2
- type FingerprintFingerprintMultimediaDevices3
- type FingerprintFingerprintMultimediaDevicesMicro
- type FingerprintFingerprintMultimediaDevicesMicro2
- type FingerprintFingerprintMultimediaDevicesMicro3
- type FingerprintFingerprintMultimediaDevicesSpeaker
- type FingerprintFingerprintMultimediaDevicesSpeaker2
- type FingerprintFingerprintMultimediaDevicesSpeaker3
- type FingerprintFingerprintMultimediaDevicesWebcam
- type FingerprintFingerprintMultimediaDevicesWebcam2
- type FingerprintFingerprintMultimediaDevicesWebcam3
- type FingerprintFingerprintNavigator
- type FingerprintFingerprintNavigator2
- type FingerprintFingerprintNavigator3
- type FingerprintFingerprintNavigatorExtraProperties
- type FingerprintFingerprintNavigatorExtraProperties2
- type FingerprintFingerprintNavigatorExtraProperties3
- type FingerprintFingerprintNavigatorUserAgentData
- type FingerprintFingerprintNavigatorUserAgentData2
- type FingerprintFingerprintNavigatorUserAgentData3
- type FingerprintFingerprintNavigatorUserAgentDataBrand
- type FingerprintFingerprintNavigatorUserAgentDataBrand2
- type FingerprintFingerprintNavigatorUserAgentDataBrand3
- type FingerprintFingerprintPluginsData
- type FingerprintFingerprintPluginsData2
- type FingerprintFingerprintPluginsData3
- type FingerprintFingerprintPluginsDataPlugin
- type FingerprintFingerprintPluginsDataPlugin2
- type FingerprintFingerprintPluginsDataPlugin3
- type FingerprintFingerprintPluginsDataPluginMimeType
- type FingerprintFingerprintPluginsDataPluginMimeType2
- type FingerprintFingerprintPluginsDataPluginMimeType3
- type FingerprintFingerprintScreen
- type FingerprintFingerprintScreen2
- type FingerprintFingerprintScreen3
- type FingerprintFingerprintVideoCard
- type FingerprintFingerprintVideoCard2
- type FingerprintFingerprintVideoCard3
- type FingerprintHeaders
- type FingerprintHeaders2
- type FingerprintHeaders3
- type GetCursorPosition
- type GetSessionsStatus
- type IndexedDB
- type IndexedDBData
- type IndexedDBDataRecord
- type IndexedDBDataRecordBlobFile
- type InternalServerError
- type Key
- type Link
- type Metadata
- type MoveMouse
- type NotFoundError
- type OptimizeBandwidth
- type Option
- type Page
- type Pdf
- type PdfResponse
- type PermissionDeniedError
- type PressKey
- type Profile4
- type ProfileCreateParams
- type ProfileCreateResponse
- type ProfileDimensions
- type ProfileFingerprint
- type ProfileFingerprintFingerprint
- type ProfileFingerprintFingerprintBattery
- type ProfileFingerprintFingerprintMultimediaDevices
- type ProfileFingerprintFingerprintMultimediaDevicesMicro
- type ProfileFingerprintFingerprintMultimediaDevicesSpeaker
- type ProfileFingerprintFingerprintMultimediaDevicesWebcam
- type ProfileFingerprintFingerprintNavigator
- type ProfileFingerprintFingerprintNavigatorExtraProperties
- type ProfileFingerprintFingerprintNavigatorUserAgentData
- type ProfileFingerprintFingerprintNavigatorUserAgentDataBrand
- type ProfileFingerprintFingerprintPluginsData
- type ProfileFingerprintFingerprintPluginsDataPlugin
- type ProfileFingerprintFingerprintPluginsDataPluginMimeType
- type ProfileFingerprintFingerprintScreen
- type ProfileFingerprintFingerprintVideoCard
- type ProfileFingerprintHeaders
- type ProfileGetParams
- type ProfileGetResponse
- type ProfileListParams
- type ProfileListResponse
- type ProfileListResponseProfilesItemStatus
- type ProfileStatus
- type ProfileUpdateParams
- type ProfileUpdateQueryParams
- type ProfileUpdateResponse
- type Profiles
- func (r *Profiles) Create(ctx context.Context, body ProfileCreateParams, opts ...RequestOption) (*ProfileCreateResponse, error)
- func (r *Profiles) Get(ctx context.Context, id string, params ProfileGetParams, opts ...RequestOption) (*ProfileGetResponse, error)
- func (r *Profiles) List(ctx context.Context, params ProfileListParams, opts ...RequestOption) (*ProfileListResponse, error)
- func (r *Profiles) Update(ctx context.Context, id string, body ProfileUpdateParams, ...) (*ProfileUpdateResponse, error)
- type RateLimitError
- type RequestOption
- func WithIdempotencyKey(key string) RequestOption
- func WithRequestHeader(key, value string) RequestOption
- func WithRequestMaxRetries(maxRetries int) RequestOption
- func WithRequestQuery(key, value string) RequestOption
- func WithRequestTimeout(timeout time.Duration) RequestOption
- func WithResponseInto(dst **http.Response) RequestOption
- type ScrapeRequestFormatItem
- type ScrapeResponse
- type Screenshot
- type ScreenshotResponse
- type Scroll
- type Session
- type Session2
- type SessionAgentLogsParams
- type SessionAgentLogsResponse
- type SessionAgentTracesParams
- type SessionAgentTracesResponse
- type SessionComputerParams
- type SessionComputerResponse
- type SessionContext
- type SessionContext2
- type SessionContextCookie
- type SessionContextCookiePartitionKey
- type SessionContextIndexedDB
- type SessionContextIndexedDBData
- type SessionContextIndexedDBDataRecord
- type SessionContextIndexedDBDataRecordBlobFile
- type SessionContextResponseCookiesItemPriority
- type SessionContextResponseCookiesItemSameSite
- type SessionContextResponseCookiesItemSourceScheme
- type SessionCostResponse
- type SessionCostResponseCurrency
- type SessionCostResponseUnit
- type SessionCostResponseUsageBrowserUnit
- type SessionCreateParams
- type SessionCreateParamsOptimizeBandwidth
- type SessionDebugConfig
- type SessionDeviceConfig
- type SessionDimensions
- type SessionEventsParams
- type SessionEventsResponse
- type SessionListParams
- type SessionLiveDetailsResponse
- type SessionLogsParams
- type SessionLogsResponse
- type SessionOptimizeBandwidth
- type SessionReleaseAllParams
- type SessionReleaseAllQueryParams
- type SessionReleaseAllResponse
- type SessionReleaseParams
- type SessionReleaseResponse
- type SessionResponseDeviceConfigDevice
- type SessionResponseProxySource
- type SessionResponseRegion
- type SessionResponseReleaseReason
- type SessionResponseStatus
- type SessionStealthConfig
- type Sessions
- func (r *Sessions) AgentLogs(ctx context.Context, id string, params SessionAgentLogsParams, ...) (*SessionAgentLogsResponse, error)
- func (r *Sessions) AgentTraces(ctx context.Context, id string, params SessionAgentTracesParams, ...) (*SessionAgentTracesResponse, error)
- func (r *Sessions) Computer(ctx context.Context, sessionID string, body SessionComputerParams, ...) (*SessionComputerResponse, error)
- func (r *Sessions) Context(ctx context.Context, id string, opts ...RequestOption) (*SessionContext, error)
- func (r *Sessions) Cost(ctx context.Context, id string, opts ...RequestOption) (*SessionCostResponse, error)
- func (r *Sessions) Create(ctx context.Context, body SessionCreateParams, opts ...RequestOption) (*Session, error)
- func (r *Sessions) Events(ctx context.Context, id string, params SessionEventsParams, ...) (*SessionEventsResponse, error)
- func (r *Sessions) Hls(ctx context.Context, id string, opts ...RequestOption) (*string, error)
- func (r *Sessions) List(ctx context.Context, params SessionListParams, opts ...RequestOption) (*CursorPage[Session2], error)
- func (r *Sessions) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...RequestOption) *CursorPageAutoPager[Session2]
- func (r *Sessions) LiveDetails(ctx context.Context, id string, opts ...RequestOption) (*SessionLiveDetailsResponse, error)
- func (r *Sessions) Logs(ctx context.Context, id string, params SessionLogsParams, ...) (*SessionLogsResponse, error)
- func (r *Sessions) Release(ctx context.Context, id string, body SessionReleaseParams, ...) (*SessionReleaseResponse, error)
- func (r *Sessions) ReleaseAll(ctx context.Context, body SessionReleaseAllParams, ...) (*SessionReleaseAllResponse, error)
- func (r *Sessions) Retrieve(ctx context.Context, id string, opts ...RequestOption) (*Session, error)
- type SessionsCaptchas
- func (r *SessionsCaptchas) Solve(ctx context.Context, sessionID string, body CaptchaSolveParams, ...) (*CaptchaSolveResponse, error)
- func (r *SessionsCaptchas) SolveImage(ctx context.Context, sessionID string, body CaptchaSolveImageParams, ...) (*CaptchaSolveImageResponse, error)
- func (r *SessionsCaptchas) Status(ctx context.Context, sessionID string, opts ...RequestOption) (*CaptchaStatusResponse, error)
- type SessionsFiles
- func (r *SessionsFiles) Delete(ctx context.Context, sessionID string, path string, opts ...RequestOption) (*interface{}, error)
- func (r *SessionsFiles) DeleteAll(ctx context.Context, sessionID string, opts ...RequestOption) (*interface{}, error)
- func (r *SessionsFiles) Download(ctx context.Context, sessionID string, path string, opts ...RequestOption) ([]byte, error)
- func (r *SessionsFiles) DownloadArchive(ctx context.Context, sessionID string, opts ...RequestOption) ([]byte, error)
- func (r *SessionsFiles) List(ctx context.Context, sessionID string, opts ...RequestOption) (*Fileslist, error)
- func (r *SessionsFiles) Upload(ctx context.Context, sessionID string, body FileUploadParams2, ...) (*File, error)
- type SessionsResponseSessionsItemDeviceConfigDevice
- type SessionsResponseSessionsItemProxySource
- type SessionsResponseSessionsItemRegion
- type SessionsResponseSessionsItemReleaseReason
- type SessionsResponseSessionsItemStatus
- type Sessionslist
- type StealthConfig
- type StealthConfig2
- type TakeScreenshot
- type TypeText
- type UnprocessableEntityError
- type Usage
- type UsageBrowser
- type UsageCaptcha
- type UsageProxy
- type Wait
- type WellKnown
- type WellknownListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConnectionError ¶
type APIConnectionError struct{ Err error }
func (*APIConnectionError) Error ¶
func (e *APIConnectionError) Error() string
func (*APIConnectionError) Unwrap ¶
func (e *APIConnectionError) Unwrap() error
type APITimeoutError ¶
type APITimeoutError struct{ Err error }
func (*APITimeoutError) Error ¶
func (e *APITimeoutError) Error() string
func (*APITimeoutError) Unwrap ¶
func (e *APITimeoutError) Unwrap() error
type AuthenticationError ¶
type AuthenticationError struct{ *APIError }
type BadRequestError ¶
type BadRequestError struct{ *APIError }
type CaptchaSolveImageParams ¶
type CaptchaSolveParams ¶
type CaptchaSolveParams struct {
// The page ID where the captcha is located
PageID *string `json:"pageId,omitempty"`
// The task ID of the specific captcha to solve
TaskID *string `json:"taskId,omitempty"`
// The URL where the captcha is located
URL *string `json:"url,omitempty"`
}
CaptchaSolveParams If no fields are provided, all detected captchas will be solved
type CaptchaSolveResponse ¶
type CaptchaState ¶
type CaptchaState struct {
// Timestamp when the state was created
Created *float64 `json:"created,omitempty"`
// Whether a captcha is currently being solved
IsSolvingCaptcha bool `json:"isSolvingCaptcha"`
// Timestamp when the state was last updated
LastUpdated *float64 `json:"lastUpdated,omitempty"`
// The page ID where the captcha is located
PageID string `json:"pageId"`
// Array of captcha tasks
Tasks []interface{} `json:"tasks"`
// The URL where the captcha is located
URL string `json:"url"`
}
type CaptchaStatusResponse ¶
type CaptchaStatusResponse []map[string]interface{}
type ClickMouse ¶
type ClickMouse struct {
Action ComputerActionRequestVariant1Action `json:"action"`
// Mouse button to click. Defaults to 'left'
Button *ComputerActionRequestVariant1Button `json:"button,omitempty"`
// Type of click (down, up, or click). Defaults to 'click'
ClickType *ComputerActionRequestVariant1ClickType `json:"click_type,omitempty"`
// X and Y coordinates [x, y]
Coordinates *[]float64 `json:"coordinates,omitempty"`
// Keys to hold while clicking
HoldKeys *[]string `json:"hold_keys,omitempty"`
// Number of clicks. Defaults to 1
NumClicks *float64 `json:"num_clicks,omitempty"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type Client ¶
type Client struct {
WellKnown *WellKnown
Credentials *CredentialsResource
Extensions *Extensions
Files *Files
Profiles *Profiles
Sessions *Sessions
// contains filtered or unexported fields
}
func NewClientWithBaseURL ¶
func (*Client) Pdf ¶
func (c *Client) Pdf(ctx context.Context, body ClientPdfParams, opts ...RequestOption) (*PdfResponse, error)
Convert webpage to PDF
func (*Client) Scrape ¶
func (c *Client) Scrape(ctx context.Context, body ClientScrapeParams, opts ...RequestOption) (*ScrapeResponse, error)
Scrape webpage content
func (*Client) Screenshot ¶
func (c *Client) Screenshot(ctx context.Context, body ClientScreenshotParams, opts ...RequestOption) (*ScreenshotResponse, error)
Capture webpage screenshot
type ClientPdfParams ¶
type ClientPdfParams struct {
// Delay before generating the PDF (in milliseconds)
Delay *float64 `json:"delay,omitempty"`
// Project to execute the PDF generation in.
ProjectID *string `json:"projectId,omitempty"`
// The desired region for the action to be performed in
Region *interface{} `json:"region,omitempty"`
// URL of the webpage to convert to PDF
URL string `json:"url"`
// Use a Steel-provided residential proxy for generating the PDF
UseProxy *bool `json:"useProxy,omitempty"`
}
type ClientScrapeParams ¶
type ClientScrapeParams struct {
// Delay before scraping (in milliseconds)
Delay *float64 `json:"delay,omitempty"`
// Desired format(s) for the scraped content. Default is `html`.
Format *[]ScrapeRequestFormatItem `json:"format,omitempty"`
// Include a PDF in the response
Pdf *bool `json:"pdf,omitempty"`
// Project to execute the scrape in.
ProjectID *string `json:"projectId,omitempty"`
// The desired region for the action to be performed in
Region *interface{} `json:"region,omitempty"`
// Include a screenshot in the response
Screenshot *bool `json:"screenshot,omitempty"`
// URL of the webpage to scrape
URL string `json:"url"`
// Use a Steel-provided residential proxy for the scrape
UseProxy *bool `json:"useProxy,omitempty"`
}
type ClientScreenshotParams ¶
type ClientScreenshotParams struct {
// Delay before capturing the screenshot (in milliseconds)
Delay *float64 `json:"delay,omitempty"`
// Capture the full page screenshot. Default is `false`.
FullPage *bool `json:"fullPage,omitempty"`
// Project to execute the screenshot in.
ProjectID *string `json:"projectId,omitempty"`
// The desired region for the action to be performed in
Region *interface{} `json:"region,omitempty"`
// URL of the webpage to capture
URL string `json:"url"`
// Use a Steel-provided residential proxy for capturing the screenshot
UseProxy *bool `json:"useProxy,omitempty"`
}
type ComputerActionRequestVariant0Action ¶
type ComputerActionRequestVariant0Action string
const (
ComputerActionRequestVariant0ActionMoveMouse ComputerActionRequestVariant0Action = "move_mouse"
)
type ComputerActionRequestVariant1Action ¶
type ComputerActionRequestVariant1Action string
const (
ComputerActionRequestVariant1ActionClickMouse ComputerActionRequestVariant1Action = "click_mouse"
)
type ComputerActionRequestVariant1Button ¶
type ComputerActionRequestVariant1Button string
const ( ComputerActionRequestVariant1ButtonLeft ComputerActionRequestVariant1Button = "left" ComputerActionRequestVariant1ButtonRight ComputerActionRequestVariant1Button = "right" ComputerActionRequestVariant1ButtonMiddle ComputerActionRequestVariant1Button = "middle" ComputerActionRequestVariant1ButtonBack ComputerActionRequestVariant1Button = "back" ComputerActionRequestVariant1ButtonForward ComputerActionRequestVariant1Button = "forward" )
type ComputerActionRequestVariant1ClickType ¶
type ComputerActionRequestVariant1ClickType string
const ( ComputerActionRequestVariant1ClickTypeDown ComputerActionRequestVariant1ClickType = "down" ComputerActionRequestVariant1ClickTypeUp ComputerActionRequestVariant1ClickType = "up" ComputerActionRequestVariant1ClickTypeClick ComputerActionRequestVariant1ClickType = "click" )
type ComputerActionRequestVariant2Action ¶
type ComputerActionRequestVariant2Action string
const (
ComputerActionRequestVariant2ActionDragMouse ComputerActionRequestVariant2Action = "drag_mouse"
)
type ComputerActionRequestVariant3Action ¶
type ComputerActionRequestVariant3Action string
const (
ComputerActionRequestVariant3ActionScroll ComputerActionRequestVariant3Action = "scroll"
)
type ComputerActionRequestVariant4Action ¶
type ComputerActionRequestVariant4Action string
const (
ComputerActionRequestVariant4ActionPressKey ComputerActionRequestVariant4Action = "press_key"
)
type ComputerActionRequestVariant5Action ¶
type ComputerActionRequestVariant5Action string
const (
ComputerActionRequestVariant5ActionTypeText ComputerActionRequestVariant5Action = "type_text"
)
type ComputerActionRequestVariant6Action ¶
type ComputerActionRequestVariant6Action string
const (
ComputerActionRequestVariant6ActionWait ComputerActionRequestVariant6Action = "wait"
)
type ComputerActionRequestVariant7Action ¶
type ComputerActionRequestVariant7Action string
const (
ComputerActionRequestVariant7ActionTakeScreenshot ComputerActionRequestVariant7Action = "take_screenshot"
)
type ComputerActionRequestVariant8Action ¶
type ComputerActionRequestVariant8Action string
const (
ComputerActionRequestVariant8ActionGetCursorPosition ComputerActionRequestVariant8Action = "get_cursor_position"
)
type ConflictError ¶
type ConflictError struct{ *APIError }
type Content ¶
type Content struct {
// Cleaned HTML content of the webpage
CleanedHTML *string `json:"cleaned_html,omitempty"`
// Raw HTML content of the webpage
HTML *string `json:"html,omitempty"`
// Webpage content converted to Markdown
Markdown *string `json:"markdown,omitempty"`
// Webpage content in Readability format
Readability *map[string]interface{} `json:"readability,omitempty"`
}
type Cookie ¶
type Cookie struct {
// The domain of the cookie
Domain *string `json:"domain,omitempty"`
// The expiration date of the cookie
Expires *float64 `json:"expires,omitempty"`
// Whether the cookie is HTTP only
HTTPOnly *bool `json:"httpOnly,omitempty"`
// The name of the cookie
Name string `json:"name"`
// The partition key of the cookie
PartitionKey *CookiePartitionKey `json:"partitionKey,omitempty"`
// The path of the cookie
Path *string `json:"path,omitempty"`
// The priority of the cookie
Priority *SessionContextResponseCookiesItemPriority `json:"priority,omitempty"`
// Whether the cookie is a same party cookie
SameParty *bool `json:"sameParty,omitempty"`
// The same site attribute of the cookie
SameSite *SessionContextResponseCookiesItemSameSite `json:"sameSite,omitempty"`
// Whether the cookie is secure
Secure *bool `json:"secure,omitempty"`
// Whether the cookie is a session cookie
Session *bool `json:"session,omitempty"`
// The size of the cookie
Size *float64 `json:"size,omitempty"`
// The source port of the cookie
SourcePort *float64 `json:"sourcePort,omitempty"`
// The source scheme of the cookie
SourceScheme *SessionContextResponseCookiesItemSourceScheme `json:"sourceScheme,omitempty"`
// The URL of the cookie
URL *string `json:"url,omitempty"`
// The value of the cookie
Value string `json:"value"`
}
Cookie Cookies to initialize in the session
type CookiePartitionKey ¶
type CookiePartitionKey struct {
// Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
HasCrossSiteAncestor bool `json:"hasCrossSiteAncestor"`
// The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.
TopLevelSite string `json:"topLevelSite"`
}
CookiePartitionKey The partition key of the cookie
type CreateSessionRequestDeviceConfigDevice ¶
type CreateSessionRequestDeviceConfigDevice string
const ( CreateSessionRequestDeviceConfigDeviceDesktop CreateSessionRequestDeviceConfigDevice = "desktop" CreateSessionRequestDeviceConfigDeviceMobile CreateSessionRequestDeviceConfigDevice = "mobile" )
type CreateSessionRequestSessionContextCookiesItemPriority ¶
type CreateSessionRequestSessionContextCookiesItemPriority string
const ( CreateSessionRequestSessionContextCookiesItemPriorityLow CreateSessionRequestSessionContextCookiesItemPriority = "Low" CreateSessionRequestSessionContextCookiesItemPriorityMedium CreateSessionRequestSessionContextCookiesItemPriority = "Medium" CreateSessionRequestSessionContextCookiesItemPriorityHigh CreateSessionRequestSessionContextCookiesItemPriority = "High" )
type CreateSessionRequestSessionContextCookiesItemSameSite ¶
type CreateSessionRequestSessionContextCookiesItemSameSite string
const ( CreateSessionRequestSessionContextCookiesItemSameSiteStrict CreateSessionRequestSessionContextCookiesItemSameSite = "Strict" CreateSessionRequestSessionContextCookiesItemSameSiteLax CreateSessionRequestSessionContextCookiesItemSameSite = "Lax" CreateSessionRequestSessionContextCookiesItemSameSiteNone CreateSessionRequestSessionContextCookiesItemSameSite = "None" )
type CreateSessionRequestSessionContextCookiesItemSourceScheme ¶
type CreateSessionRequestSessionContextCookiesItemSourceScheme string
const ( CreateSessionRequestSessionContextCookiesItemSourceSchemeUnset CreateSessionRequestSessionContextCookiesItemSourceScheme = "Unset" CreateSessionRequestSessionContextCookiesItemSourceSchemeNonSecure CreateSessionRequestSessionContextCookiesItemSourceScheme = "NonSecure" CreateSessionRequestSessionContextCookiesItemSourceSchemeSecure CreateSessionRequestSessionContextCookiesItemSourceScheme = "Secure" )
type Credential ¶
type Credential struct {
// Date and time the credential was created
CreatedAt time.Time `json:"createdAt"`
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Date and time the credential was last updated
UpdatedAt time.Time `json:"updatedAt"`
// Value for the credential
Value map[string]string `json:"value"`
}
type Credential2 ¶
type Credential2 struct {
// Date and time the credential was created
CreatedAt time.Time `json:"createdAt"`
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Date and time the credential was last updated
UpdatedAt time.Time `json:"updatedAt"`
}
type CredentialCreateParams ¶
type CredentialCreateParams struct {
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Project to store the credential in.
ProjectID *string `json:"projectId,omitempty"`
// Value for the credential
Value map[string]string `json:"value"`
}
type CredentialCreateResponse ¶
type CredentialCreateResponse struct {
// Date and time the credential was created
CreatedAt time.Time `json:"createdAt"`
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Date and time the credential was last updated
UpdatedAt time.Time `json:"updatedAt"`
}
type CredentialDeleteParams ¶
type CredentialDeleteParams struct {
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin string `json:"origin"`
// Project to delete the credential from.
ProjectID *string `json:"projectId,omitempty"`
}
type CredentialDeleteResponse ¶
type CredentialDeleteResponse struct {
Success bool `json:"success"`
}
type CredentialListParams ¶
type CredentialListResponse ¶
type CredentialListResponse struct {
Credentials []Credential2 `json:"credentials"`
}
type CredentialUpdateParams ¶
type CredentialUpdateParams struct {
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Project to update the credential in.
ProjectID *string `json:"projectId,omitempty"`
// Value for the credential
Value *map[string]string `json:"value,omitempty"`
}
type CredentialUpdateResponse ¶
type CredentialUpdateResponse struct {
// Date and time the credential was created
CreatedAt time.Time `json:"createdAt"`
// Label for the credential
Label *string `json:"label,omitempty"`
// The namespace the credential is stored against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Website origin the credential is for
Origin *string `json:"origin,omitempty"`
// Date and time the credential was last updated
UpdatedAt time.Time `json:"updatedAt"`
}
type Credentials ¶
type Credentials struct {
AutoSubmit *bool `json:"autoSubmit,omitempty"`
BlurFields *bool `json:"blurFields,omitempty"`
ExactOrigin *bool `json:"exactOrigin,omitempty"`
}
Credentials Configuration for session credentials
type CredentialsResource ¶
type CredentialsResource struct {
// contains filtered or unexported fields
}
func (*CredentialsResource) Create ¶
func (r *CredentialsResource) Create(ctx context.Context, body CredentialCreateParams, opts ...RequestOption) (*CredentialCreateResponse, error)
Stores credentials
func (*CredentialsResource) Delete ¶
func (r *CredentialsResource) Delete(ctx context.Context, body CredentialDeleteParams, opts ...RequestOption) (*CredentialDeleteResponse, error)
Deletes credentials
func (*CredentialsResource) List ¶
func (r *CredentialsResource) List(ctx context.Context, params CredentialListParams, opts ...RequestOption) (*CredentialListResponse, error)
List all credential metadata
func (*CredentialsResource) Update ¶
func (r *CredentialsResource) Update(ctx context.Context, body CredentialUpdateParams, opts ...RequestOption) (*CredentialUpdateResponse, error)
Updates credentials
type CursorPage ¶
type CursorPage[T any] struct { Sessions []T `json:"sessions"` // contains filtered or unexported fields }
func (*CursorPage[T]) GetNextPage ¶
func (p *CursorPage[T]) GetNextPage() (*CursorPage[T], error)
type CursorPageAutoPager ¶
type CursorPageAutoPager[T any] struct { // contains filtered or unexported fields }
func NewCursorPageAutoPager ¶
func NewCursorPageAutoPager[T any](page *CursorPage[T], err error) *CursorPageAutoPager[T]
func (*CursorPageAutoPager[T]) Current ¶
func (a *CursorPageAutoPager[T]) Current() T
func (*CursorPageAutoPager[T]) Err ¶
func (a *CursorPageAutoPager[T]) Err() error
func (*CursorPageAutoPager[T]) Next ¶
func (a *CursorPageAutoPager[T]) Next() bool
type Data ¶
type Data struct {
// Timestamp when the file was created
LastModified time.Time `json:"lastModified"`
// Path to the file in the storage system
Path string `json:"path"`
// Size of the file in bytes
Size float64 `json:"size"`
}
Data Array of files for the current page
type DebugConfig ¶
type DebugConfig struct {
// Allow interaction with the browser session via the debug URL viewer. When false, the session viewer will be view-only. Default is true.
Interactive *bool `json:"interactive,omitempty"`
// Show the OS-level mouse cursor in the WebRTC stream (headful mode only). When false, the system cursor will not be rendered in the stream. Default is true.
SystemCursor *bool `json:"systemCursor,omitempty"`
}
DebugConfig Configuration for the debug URL and session viewer. Controls interaction capabilities, cursor visibility, and other debug-related settings.
type DebugConfig2 ¶
type DebugConfig2 struct {
// Whether interaction is allowed via the debug URL viewer. When false, the session viewer is view-only.
Interactive *bool `json:"interactive,omitempty"`
// Whether the OS-level mouse cursor is shown in the WebRTC stream (headful mode only).
SystemCursor *bool `json:"systemCursor,omitempty"`
}
DebugConfig2 Configuration for the debug URL and session viewer. Controls interaction capabilities and cursor visibility.
type DetailsResponse ¶
type DetailsResponse struct {
Plan string `json:"plan"`
}
type DeviceConfig ¶
type DeviceConfig struct {
Device *CreateSessionRequestDeviceConfigDevice `json:"device,omitempty"`
}
DeviceConfig Device configuration for the session. Specify 'mobile' for mobile device fingerprints and configurations.
type DeviceConfig2 ¶
type DeviceConfig2 struct {
Device *SessionResponseDeviceConfigDevice `json:"device,omitempty"`
}
DeviceConfig2 Device configuration for the session
type Dimensions ¶
type Dimensions struct {
// Height of the session
Height int64 `json:"height"`
// Width of the session
Width int64 `json:"width"`
}
Dimensions Viewport and browser window dimensions for the session. Mobile sessions require dimensions of at least 508x1074; smaller mobile dimensions are rejected with a 400 response.
type Dimensions2 ¶
Dimensions2 The dimensions associated with the profile
type Dimensions3 ¶
Dimensions3 The dimensions associated with the profile
type Dimensions4 ¶
type Dimensions4 struct {
// Height of the browser window
Height int64 `json:"height"`
// Width of the browser window
Width int64 `json:"width"`
}
Dimensions4 Viewport and browser window dimensions for the session
type Dimensions5 ¶
Dimensions5 The dimensions associated with the profile
type Dimensions6 ¶
Dimensions6 The dimensions associated with the profile
type Dimensions7 ¶
Dimensions7 The dimensions associated with the profile
type DragMouse ¶
type DragMouse struct {
Action ComputerActionRequestVariant2Action `json:"action"`
// Keys to hold while dragging
HoldKeys *[]string `json:"hold_keys,omitempty"`
// Array of [x, y] coordinate pairs
Path [][]float64 `json:"path"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Context *[]Context `json:"context,omitempty"`
Error *string `json:"error,omitempty"`
LinkToDocs *string `json:"linkToDocs,omitempty"`
Message string `json:"message"`
}
ErrorResponse An error response from the API
type Extension2 ¶
type Extension2 struct {
// Creation timestamp
CreatedAt string `json:"createdAt"`
// Unique extension identifier (e.g., ext_12345)
ID string `json:"id"`
// Extension name
Name string `json:"name"`
// Last update timestamp
UpdatedAt string `json:"updatedAt"`
}
Extension2 List of extensions for the organization
type ExtensionDeleteAllResponse ¶
type ExtensionDeleteAllResponse struct {
Message string `json:"message"`
}
type ExtensionDeleteResponse ¶
type ExtensionDeleteResponse struct {
Message string `json:"message"`
}
type ExtensionListResponse ¶
type ExtensionListResponse struct {
// Total number of extensions
Count float64 `json:"count"`
// List of extensions for the organization
Extensions []Extension2 `json:"extensions"`
}
ExtensionListResponse Response containing a list of extensions for the organization
type ExtensionUpdateParams ¶
type ExtensionUpdateParams struct {
// Extension .zip/.crx file
File *FileUpload `json:"file,omitempty"`
// Extension URL
URL *string `json:"url,omitempty"`
}
type ExtensionUpdateResponse ¶
type ExtensionUploadParams ¶
type ExtensionUploadParams struct {
// Extension .zip/.crx file
File *FileUpload `json:"file,omitempty"`
// Extension URL
URL *string `json:"url,omitempty"`
}
type ExtensionUploadResponse ¶
type Extensions ¶
type Extensions struct {
// contains filtered or unexported fields
}
func (*Extensions) Delete ¶
func (r *Extensions) Delete(ctx context.Context, extensionID string, opts ...RequestOption) (*ExtensionDeleteResponse, error)
Delete extension
func (*Extensions) DeleteAll ¶
func (r *Extensions) DeleteAll(ctx context.Context, opts ...RequestOption) (*ExtensionDeleteAllResponse, error)
Delete all extensions
func (*Extensions) Download ¶
func (r *Extensions) Download(ctx context.Context, extensionID string, opts ...RequestOption) (*FileUpload, error)
Download extension
func (*Extensions) List ¶
func (r *Extensions) List(ctx context.Context, opts ...RequestOption) (*ExtensionListResponse, error)
List extensions
func (*Extensions) Update ¶
func (r *Extensions) Update(ctx context.Context, extensionID string, body ExtensionUpdateParams, opts ...RequestOption) (*ExtensionUpdateResponse, error)
Update extension
func (*Extensions) Upload ¶
func (r *Extensions) Upload(ctx context.Context, body ExtensionUploadParams, opts ...RequestOption) (*ExtensionUploadResponse, error)
Upload extension
type FileUpload ¶
type FileUploadParams ¶
type FileUploadParams struct {
// The file to upload (binary) or URL string to download from
File FileUpload `json:"file"`
// Path to the file in the storage system
Path *string `json:"path,omitempty"`
}
type FileUploadParams2 ¶
type FileUploadParams2 struct {
// The file to upload (binary) or URL string to download from
File FileUpload `json:"file"`
// Path to the file in the storage system
Path *string `json:"path,omitempty"`
}
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
func (*Files) Delete ¶
func (r *Files) Delete(ctx context.Context, path string, opts ...RequestOption) (*interface{}, error)
Delete a global file
func (*Files) Upload ¶
func (r *Files) Upload(ctx context.Context, body FileUploadParams, opts ...RequestOption) (*File, error)
Upload a global file
type Fileslist ¶
type Fileslist struct {
// Array of files for the current page
Data []Data `json:"data"`
}
type Fingerprint ¶
type Fingerprint struct {
Fingerprint FingerprintFingerprint `json:"fingerprint"`
Headers FingerprintHeaders `json:"headers"`
}
Fingerprint The fingerprint associated with the profile
type Fingerprint2 ¶
type Fingerprint2 struct {
Fingerprint FingerprintFingerprint2 `json:"fingerprint"`
Headers FingerprintHeaders2 `json:"headers"`
}
Fingerprint2 The fingerprint associated with the profile
type Fingerprint3 ¶
type Fingerprint3 struct {
Fingerprint FingerprintFingerprint3 `json:"fingerprint"`
Headers FingerprintHeaders3 `json:"headers"`
}
Fingerprint3 The fingerprint associated with the profile
type FingerprintFingerprint ¶
type FingerprintFingerprint struct {
AudioCodecs map[string]string `json:"audioCodecs"`
Battery FingerprintFingerprintBattery `json:"battery"`
Fonts []string `json:"fonts"`
MockWebRtc *bool `json:"mockWebRTC,omitempty"`
MultimediaDevices FingerprintFingerprintMultimediaDevices `json:"multimediaDevices"`
PluginsData FingerprintFingerprintPluginsData `json:"pluginsData"`
Screen FingerprintFingerprintScreen `json:"screen"`
Slim *bool `json:"slim,omitempty"`
VideoCard FingerprintFingerprintVideoCard `json:"videoCard"`
VideoCodecs map[string]string `json:"videoCodecs"`
}
type FingerprintFingerprint2 ¶
type FingerprintFingerprint2 struct {
AudioCodecs map[string]string `json:"audioCodecs"`
Battery FingerprintFingerprintBattery2 `json:"battery"`
Fonts []string `json:"fonts"`
MockWebRtc *bool `json:"mockWebRTC,omitempty"`
MultimediaDevices FingerprintFingerprintMultimediaDevices2 `json:"multimediaDevices"`
PluginsData FingerprintFingerprintPluginsData2 `json:"pluginsData"`
Screen FingerprintFingerprintScreen2 `json:"screen"`
Slim *bool `json:"slim,omitempty"`
VideoCard FingerprintFingerprintVideoCard2 `json:"videoCard"`
VideoCodecs map[string]string `json:"videoCodecs"`
}
type FingerprintFingerprint3 ¶
type FingerprintFingerprint3 struct {
AudioCodecs map[string]string `json:"audioCodecs"`
Battery FingerprintFingerprintBattery3 `json:"battery"`
Fonts []string `json:"fonts"`
MockWebRtc *bool `json:"mockWebRTC,omitempty"`
MultimediaDevices FingerprintFingerprintMultimediaDevices3 `json:"multimediaDevices"`
PluginsData FingerprintFingerprintPluginsData3 `json:"pluginsData"`
Screen FingerprintFingerprintScreen3 `json:"screen"`
Slim *bool `json:"slim,omitempty"`
VideoCard FingerprintFingerprintVideoCard3 `json:"videoCard"`
VideoCodecs map[string]string `json:"videoCodecs"`
}
type FingerprintFingerprintMultimediaDevices ¶
type FingerprintFingerprintMultimediaDevices struct {
Micros []FingerprintFingerprintMultimediaDevicesMicro `json:"micros"`
Speakers []FingerprintFingerprintMultimediaDevicesSpeaker `json:"speakers"`
Webcams []FingerprintFingerprintMultimediaDevicesWebcam `json:"webcams"`
}
type FingerprintFingerprintMultimediaDevices2 ¶
type FingerprintFingerprintMultimediaDevices2 struct {
Micros []FingerprintFingerprintMultimediaDevicesMicro2 `json:"micros"`
Speakers []FingerprintFingerprintMultimediaDevicesSpeaker2 `json:"speakers"`
Webcams []FingerprintFingerprintMultimediaDevicesWebcam2 `json:"webcams"`
}
type FingerprintFingerprintMultimediaDevices3 ¶
type FingerprintFingerprintMultimediaDevices3 struct {
Micros []FingerprintFingerprintMultimediaDevicesMicro3 `json:"micros"`
Speakers []FingerprintFingerprintMultimediaDevicesSpeaker3 `json:"speakers"`
Webcams []FingerprintFingerprintMultimediaDevicesWebcam3 `json:"webcams"`
}
type FingerprintFingerprintNavigator ¶
type FingerprintFingerprintNavigator struct {
}
type FingerprintFingerprintNavigator2 ¶
type FingerprintFingerprintNavigator2 struct {
}
type FingerprintFingerprintNavigator3 ¶
type FingerprintFingerprintNavigator3 struct {
}
type FingerprintFingerprintNavigatorExtraProperties ¶
type FingerprintFingerprintNavigatorExtraProperties struct {
}
type FingerprintFingerprintNavigatorExtraProperties2 ¶
type FingerprintFingerprintNavigatorExtraProperties2 struct {
}
type FingerprintFingerprintNavigatorExtraProperties3 ¶
type FingerprintFingerprintNavigatorExtraProperties3 struct {
}
type FingerprintFingerprintNavigatorUserAgentData ¶
type FingerprintFingerprintNavigatorUserAgentData struct {
}
type FingerprintFingerprintNavigatorUserAgentData2 ¶
type FingerprintFingerprintNavigatorUserAgentData2 struct {
}
type FingerprintFingerprintNavigatorUserAgentData3 ¶
type FingerprintFingerprintNavigatorUserAgentData3 struct {
}
type FingerprintFingerprintNavigatorUserAgentDataBrand ¶
type FingerprintFingerprintNavigatorUserAgentDataBrand struct {
}
type FingerprintFingerprintNavigatorUserAgentDataBrand2 ¶
type FingerprintFingerprintNavigatorUserAgentDataBrand2 struct {
}
type FingerprintFingerprintNavigatorUserAgentDataBrand3 ¶
type FingerprintFingerprintNavigatorUserAgentDataBrand3 struct {
}
type FingerprintFingerprintPluginsData ¶
type FingerprintFingerprintPluginsData struct {
MimeTypes []string `json:"mimeTypes"`
Plugins []FingerprintFingerprintPluginsDataPlugin `json:"plugins"`
}
type FingerprintFingerprintPluginsData2 ¶
type FingerprintFingerprintPluginsData2 struct {
MimeTypes []string `json:"mimeTypes"`
Plugins []FingerprintFingerprintPluginsDataPlugin2 `json:"plugins"`
}
type FingerprintFingerprintPluginsData3 ¶
type FingerprintFingerprintPluginsData3 struct {
MimeTypes []string `json:"mimeTypes"`
Plugins []FingerprintFingerprintPluginsDataPlugin3 `json:"plugins"`
}
type FingerprintFingerprintPluginsDataPlugin ¶
type FingerprintFingerprintPluginsDataPlugin struct {
Description *string `json:"description,omitempty"`
Filename *string `json:"filename,omitempty"`
MimeTypes []FingerprintFingerprintPluginsDataPluginMimeType `json:"mimeTypes"`
Name *string `json:"name,omitempty"`
}
type FingerprintFingerprintPluginsDataPlugin2 ¶
type FingerprintFingerprintPluginsDataPlugin2 struct {
Description *string `json:"description,omitempty"`
Filename *string `json:"filename,omitempty"`
MimeTypes []FingerprintFingerprintPluginsDataPluginMimeType2 `json:"mimeTypes"`
Name *string `json:"name,omitempty"`
}
type FingerprintFingerprintPluginsDataPlugin3 ¶
type FingerprintFingerprintPluginsDataPlugin3 struct {
Description *string `json:"description,omitempty"`
Filename *string `json:"filename,omitempty"`
MimeTypes []FingerprintFingerprintPluginsDataPluginMimeType3 `json:"mimeTypes"`
Name *string `json:"name,omitempty"`
}
type FingerprintFingerprintScreen ¶
type FingerprintFingerprintScreen struct {
AvailHeight *float64 `json:"availHeight,omitempty"`
AvailLeft *float64 `json:"availLeft,omitempty"`
AvailTop *float64 `json:"availTop,omitempty"`
AvailWidth *float64 `json:"availWidth,omitempty"`
ClientHeight *float64 `json:"clientHeight,omitempty"`
ClientWidth *float64 `json:"clientWidth,omitempty"`
ColorDepth *float64 `json:"colorDepth,omitempty"`
DevicePixelRatio *float64 `json:"devicePixelRatio,omitempty"`
HasHdr *bool `json:"hasHDR,omitempty"`
Height *float64 `json:"height,omitempty"`
InnerHeight *float64 `json:"innerHeight,omitempty"`
InnerWidth *float64 `json:"innerWidth,omitempty"`
OuterHeight *float64 `json:"outerHeight,omitempty"`
OuterWidth *float64 `json:"outerWidth,omitempty"`
PageXOffset *float64 `json:"pageXOffset,omitempty"`
PageYOffset *float64 `json:"pageYOffset,omitempty"`
PixelDepth *float64 `json:"pixelDepth,omitempty"`
ScreenX *float64 `json:"screenX,omitempty"`
Width *float64 `json:"width,omitempty"`
}
type FingerprintFingerprintScreen2 ¶
type FingerprintFingerprintScreen2 struct {
AvailHeight *float64 `json:"availHeight,omitempty"`
AvailLeft *float64 `json:"availLeft,omitempty"`
AvailTop *float64 `json:"availTop,omitempty"`
AvailWidth *float64 `json:"availWidth,omitempty"`
ClientHeight *float64 `json:"clientHeight,omitempty"`
ClientWidth *float64 `json:"clientWidth,omitempty"`
ColorDepth *float64 `json:"colorDepth,omitempty"`
DevicePixelRatio *float64 `json:"devicePixelRatio,omitempty"`
HasHdr *bool `json:"hasHDR,omitempty"`
Height *float64 `json:"height,omitempty"`
InnerHeight *float64 `json:"innerHeight,omitempty"`
InnerWidth *float64 `json:"innerWidth,omitempty"`
OuterHeight *float64 `json:"outerHeight,omitempty"`
OuterWidth *float64 `json:"outerWidth,omitempty"`
PageXOffset *float64 `json:"pageXOffset,omitempty"`
PageYOffset *float64 `json:"pageYOffset,omitempty"`
PixelDepth *float64 `json:"pixelDepth,omitempty"`
ScreenX *float64 `json:"screenX,omitempty"`
Width *float64 `json:"width,omitempty"`
}
type FingerprintFingerprintScreen3 ¶
type FingerprintFingerprintScreen3 struct {
AvailHeight *float64 `json:"availHeight,omitempty"`
AvailLeft *float64 `json:"availLeft,omitempty"`
AvailTop *float64 `json:"availTop,omitempty"`
AvailWidth *float64 `json:"availWidth,omitempty"`
ClientHeight *float64 `json:"clientHeight,omitempty"`
ClientWidth *float64 `json:"clientWidth,omitempty"`
ColorDepth *float64 `json:"colorDepth,omitempty"`
DevicePixelRatio *float64 `json:"devicePixelRatio,omitempty"`
HasHdr *bool `json:"hasHDR,omitempty"`
Height *float64 `json:"height,omitempty"`
InnerHeight *float64 `json:"innerHeight,omitempty"`
InnerWidth *float64 `json:"innerWidth,omitempty"`
OuterHeight *float64 `json:"outerHeight,omitempty"`
OuterWidth *float64 `json:"outerWidth,omitempty"`
PageXOffset *float64 `json:"pageXOffset,omitempty"`
PageYOffset *float64 `json:"pageYOffset,omitempty"`
PixelDepth *float64 `json:"pixelDepth,omitempty"`
ScreenX *float64 `json:"screenX,omitempty"`
Width *float64 `json:"width,omitempty"`
}
type FingerprintHeaders ¶
type FingerprintHeaders struct {
Accept *string `json:"accept,omitempty"`
AcceptEncoding *string `json:"accept-encoding,omitempty"`
AcceptLanguage *string `json:"accept-language,omitempty"`
Dnt *string `json:"dnt,omitempty"`
SecChUa *string `json:"sec-ch-ua,omitempty"`
SecChUaMobile *string `json:"sec-ch-ua-mobile,omitempty"`
SecChUaPlatform *string `json:"sec-ch-ua-platform,omitempty"`
SecFetchDest *string `json:"sec-fetch-dest,omitempty"`
SecFetchMode *string `json:"sec-fetch-mode,omitempty"`
SecFetchSite *string `json:"sec-fetch-site,omitempty"`
SecFetchUser *string `json:"sec-fetch-user,omitempty"`
UpgradeInsecureRequests *string `json:"upgrade-insecure-requests,omitempty"`
UserAgent *string `json:"user-agent,omitempty"`
}
type FingerprintHeaders2 ¶
type FingerprintHeaders2 struct {
Accept *string `json:"accept,omitempty"`
AcceptEncoding *string `json:"accept-encoding,omitempty"`
AcceptLanguage *string `json:"accept-language,omitempty"`
Dnt *string `json:"dnt,omitempty"`
SecChUa *string `json:"sec-ch-ua,omitempty"`
SecChUaMobile *string `json:"sec-ch-ua-mobile,omitempty"`
SecChUaPlatform *string `json:"sec-ch-ua-platform,omitempty"`
SecFetchDest *string `json:"sec-fetch-dest,omitempty"`
SecFetchMode *string `json:"sec-fetch-mode,omitempty"`
SecFetchSite *string `json:"sec-fetch-site,omitempty"`
SecFetchUser *string `json:"sec-fetch-user,omitempty"`
UpgradeInsecureRequests *string `json:"upgrade-insecure-requests,omitempty"`
UserAgent *string `json:"user-agent,omitempty"`
}
type FingerprintHeaders3 ¶
type FingerprintHeaders3 struct {
Accept *string `json:"accept,omitempty"`
AcceptEncoding *string `json:"accept-encoding,omitempty"`
AcceptLanguage *string `json:"accept-language,omitempty"`
Dnt *string `json:"dnt,omitempty"`
SecChUa *string `json:"sec-ch-ua,omitempty"`
SecChUaMobile *string `json:"sec-ch-ua-mobile,omitempty"`
SecChUaPlatform *string `json:"sec-ch-ua-platform,omitempty"`
SecFetchDest *string `json:"sec-fetch-dest,omitempty"`
SecFetchMode *string `json:"sec-fetch-mode,omitempty"`
SecFetchSite *string `json:"sec-fetch-site,omitempty"`
SecFetchUser *string `json:"sec-fetch-user,omitempty"`
UpgradeInsecureRequests *string `json:"upgrade-insecure-requests,omitempty"`
UserAgent *string `json:"user-agent,omitempty"`
}
type GetCursorPosition ¶
type GetCursorPosition struct {
Action ComputerActionRequestVariant8Action `json:"action"`
}
type GetSessionsStatus ¶
type GetSessionsStatus string
const ( GetSessionsStatusLive GetSessionsStatus = "live" GetSessionsStatusReleased GetSessionsStatus = "released" GetSessionsStatusFailed GetSessionsStatus = "failed" )
type IndexedDB ¶
type IndexedDB struct {
Data []IndexedDBData `json:"data"`
ID float64 `json:"id"`
Name string `json:"name"`
}
IndexedDB Domain-specific indexedDB items to initialize in the session
type IndexedDBData ¶
type IndexedDBData struct {
ID float64 `json:"id"`
Name string `json:"name"`
Records []IndexedDBDataRecord `json:"records"`
}
type IndexedDBDataRecord ¶
type IndexedDBDataRecord struct {
BlobFiles *[]IndexedDBDataRecordBlobFile `json:"blobFiles,omitempty"`
Key interface{} `json:"key"`
Value interface{} `json:"value"`
}
type InternalServerError ¶
type InternalServerError struct{ *APIError }
type Key ¶
type Key struct {
// The specific cryptographic algorithm used with the key (e.g., 'RS256').
Alg *string `json:"alg,omitempty"`
// The exponent for the RSA public key.
E *string `json:"e,omitempty"`
// The unique identifier for the key.
Kid *string `json:"kid,omitempty"`
// The key type, identifying the algorithm family (e.g., 'RSA').
Kty *string `json:"kty,omitempty"`
// The modulus for the RSA public key.
N *string `json:"n,omitempty"`
// The intended use of the public key (e.g., 'sig' for signature).
Use *string `json:"use,omitempty"`
}
Key A list of JSON Web Keys.
type Metadata ¶
type Metadata struct {
// Author of the article content
ArticleAuthor *string `json:"articleAuthor,omitempty"`
// Author of the webpage content
Author *string `json:"author,omitempty"`
// Canonical URL of the webpage
Canonical *string `json:"canonical,omitempty"`
// Description of the webpage
Description *string `json:"description,omitempty"`
// Favicon URL of the website
Favicon *string `json:"favicon,omitempty"`
// JSON-LD structured data from the webpage
JSONLd *interface{} `json:"jsonLd,omitempty"`
// Keywords associated with the webpage
Keywords *string `json:"keywords,omitempty"`
// Detected language of the webpage
Language *string `json:"language,omitempty"`
// Last modification time of the content
ModifiedTime *string `json:"modifiedTime,omitempty"`
// Open Graph description
OgDescription *string `json:"ogDescription,omitempty"`
// Open Graph image URL
OgImage *string `json:"ogImage,omitempty"`
// Open Graph site name
OgSiteName *string `json:"ogSiteName,omitempty"`
// Open Graph title
OgTitle *string `json:"ogTitle,omitempty"`
// Open Graph URL
OgURL *string `json:"ogUrl,omitempty"`
// Publication time of the content
PublishedTime *string `json:"publishedTime,omitempty"`
// HTTP status code of the response
StatusCode int64 `json:"statusCode"`
// Timestamp when the scrape was performed
Timestamp *time.Time `json:"timestamp,omitempty"`
// Title of the webpage
Title *string `json:"title,omitempty"`
// Source URL of the scraped page
URLSource *string `json:"urlSource,omitempty"`
}
type MoveMouse ¶
type MoveMouse struct {
Action ComputerActionRequestVariant0Action `json:"action"`
// X and Y coordinates [x, y]
Coordinates []float64 `json:"coordinates"`
// Keys to hold while moving
HoldKeys *[]string `json:"hold_keys,omitempty"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type NotFoundError ¶
type NotFoundError struct{ *APIError }
type OptimizeBandwidth ¶
type OptimizeBandwidth struct {
BlockHosts *[]string `json:"blockHosts,omitempty"`
BlockImages *bool `json:"blockImages,omitempty"`
BlockMedia *bool `json:"blockMedia,omitempty"`
BlockStylesheets *bool `json:"blockStylesheets,omitempty"`
BlockURLPatterns *[]string `json:"blockUrlPatterns,omitempty"`
}
OptimizeBandwidth Bandwidth optimizations that were applied to the session.
type Option ¶
type Option func(*Client)
func WithHTTPClient ¶
func WithHeader ¶
func WithMaxRetries ¶
func WithTimeout ¶
type PdfResponse ¶
type PdfResponse struct {
// URL where the PDF is hosted
URL string `json:"url"`
}
type PermissionDeniedError ¶
type PermissionDeniedError struct{ *APIError }
type PressKey ¶
type PressKey struct {
Action ComputerActionRequestVariant4Action `json:"action"`
// Duration to hold keys in seconds
Duration *float64 `json:"duration,omitempty"`
// Keys to press
Keys []string `json:"keys"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type Profile4 ¶
type Profile4 struct {
// The date and time when the profile was created
CreatedAt time.Time `json:"createdAt"`
// The credentials configuration associated with the profile
CredentialsConfig interface{} `json:"credentialsConfig"`
// The dimensions associated with the profile
Dimensions *ProfileDimensions `json:"dimensions,omitempty"`
// The extension IDs associated with the profile
ExtensionIDs *[]string `json:"extensionIds,omitempty"`
// The fingerprint associated with the profile
Fingerprint *ProfileFingerprint `json:"fingerprint,omitempty"`
// The unique identifier for the profile
ID string `json:"id"`
// The project ID associated with the profile
ProjectID *string `json:"projectId,omitempty"`
// The last session ID associated with the profile
SourceSessionID *string `json:"sourceSessionId,omitempty"`
// The status of the profile
Status ProfileListResponseProfilesItemStatus `json:"status"`
// The date and time when the profile was last updated
UpdatedAt time.Time `json:"updatedAt"`
// The proxy configuration associated with the profile
UseProxyConfig interface{} `json:"useProxyConfig"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
}
Profile4 The list of profiles
type ProfileCreateParams ¶
type ProfileCreateParams struct {
// The dimensions associated with the profile
Dimensions *Dimensions3 `json:"dimensions,omitempty"`
// Project to create the profile in
ProjectID *string `json:"projectId,omitempty"`
// The proxy associated with the profile
ProxyURL *string `json:"proxyUrl,omitempty"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
// The user data directory associated with the profile
UserDataDir FileUpload `json:"userDataDir"`
}
type ProfileCreateResponse ¶
type ProfileCreateResponse struct {
// The date and time when the profile was created
CreatedAt time.Time `json:"createdAt"`
// The credentials configuration associated with the profile
CredentialsConfig interface{} `json:"credentialsConfig"`
// The dimensions associated with the profile
Dimensions *Dimensions2 `json:"dimensions,omitempty"`
// The extension IDs associated with the profile
ExtensionIDs *[]string `json:"extensionIds,omitempty"`
// The fingerprint associated with the profile
Fingerprint *Fingerprint `json:"fingerprint,omitempty"`
// The unique identifier for the profile
ID string `json:"id"`
// The project ID associated with the profile
ProjectID *string `json:"projectId,omitempty"`
// The last session ID associated with the profile
SourceSessionID *string `json:"sourceSessionId,omitempty"`
// The status of the profile
Status ProfileStatus `json:"status"`
// The date and time when the profile was last updated
UpdatedAt time.Time `json:"updatedAt"`
// The proxy configuration associated with the profile
UseProxyConfig interface{} `json:"useProxyConfig"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
}
type ProfileDimensions ¶
ProfileDimensions The dimensions associated with the profile
type ProfileFingerprint ¶
type ProfileFingerprint struct {
Fingerprint ProfileFingerprintFingerprint `json:"fingerprint"`
Headers ProfileFingerprintHeaders `json:"headers"`
}
ProfileFingerprint The fingerprint associated with the profile
type ProfileFingerprintFingerprint ¶
type ProfileFingerprintFingerprint struct {
AudioCodecs map[string]string `json:"audioCodecs"`
Battery ProfileFingerprintFingerprintBattery `json:"battery"`
Fonts []string `json:"fonts"`
MockWebRtc *bool `json:"mockWebRTC,omitempty"`
MultimediaDevices ProfileFingerprintFingerprintMultimediaDevices `json:"multimediaDevices"`
PluginsData ProfileFingerprintFingerprintPluginsData `json:"pluginsData"`
Screen ProfileFingerprintFingerprintScreen `json:"screen"`
Slim *bool `json:"slim,omitempty"`
VideoCard ProfileFingerprintFingerprintVideoCard `json:"videoCard"`
VideoCodecs map[string]string `json:"videoCodecs"`
}
type ProfileFingerprintFingerprintMultimediaDevices ¶
type ProfileFingerprintFingerprintMultimediaDevices struct {
Micros []ProfileFingerprintFingerprintMultimediaDevicesMicro `json:"micros"`
Speakers []ProfileFingerprintFingerprintMultimediaDevicesSpeaker `json:"speakers"`
Webcams []ProfileFingerprintFingerprintMultimediaDevicesWebcam `json:"webcams"`
}
type ProfileFingerprintFingerprintNavigator ¶
type ProfileFingerprintFingerprintNavigator struct {
}
type ProfileFingerprintFingerprintNavigatorExtraProperties ¶
type ProfileFingerprintFingerprintNavigatorExtraProperties struct {
}
type ProfileFingerprintFingerprintNavigatorUserAgentData ¶
type ProfileFingerprintFingerprintNavigatorUserAgentData struct {
}
type ProfileFingerprintFingerprintNavigatorUserAgentDataBrand ¶
type ProfileFingerprintFingerprintNavigatorUserAgentDataBrand struct {
}
type ProfileFingerprintFingerprintPluginsData ¶
type ProfileFingerprintFingerprintPluginsData struct {
MimeTypes []string `json:"mimeTypes"`
Plugins []ProfileFingerprintFingerprintPluginsDataPlugin `json:"plugins"`
}
type ProfileFingerprintFingerprintPluginsDataPlugin ¶
type ProfileFingerprintFingerprintPluginsDataPlugin struct {
Description *string `json:"description,omitempty"`
Filename *string `json:"filename,omitempty"`
MimeTypes []ProfileFingerprintFingerprintPluginsDataPluginMimeType `json:"mimeTypes"`
Name *string `json:"name,omitempty"`
}
type ProfileFingerprintFingerprintScreen ¶
type ProfileFingerprintFingerprintScreen struct {
AvailHeight *float64 `json:"availHeight,omitempty"`
AvailLeft *float64 `json:"availLeft,omitempty"`
AvailTop *float64 `json:"availTop,omitempty"`
AvailWidth *float64 `json:"availWidth,omitempty"`
ClientHeight *float64 `json:"clientHeight,omitempty"`
ClientWidth *float64 `json:"clientWidth,omitempty"`
ColorDepth *float64 `json:"colorDepth,omitempty"`
DevicePixelRatio *float64 `json:"devicePixelRatio,omitempty"`
HasHdr *bool `json:"hasHDR,omitempty"`
Height *float64 `json:"height,omitempty"`
InnerHeight *float64 `json:"innerHeight,omitempty"`
InnerWidth *float64 `json:"innerWidth,omitempty"`
OuterHeight *float64 `json:"outerHeight,omitempty"`
OuterWidth *float64 `json:"outerWidth,omitempty"`
PageXOffset *float64 `json:"pageXOffset,omitempty"`
PageYOffset *float64 `json:"pageYOffset,omitempty"`
PixelDepth *float64 `json:"pixelDepth,omitempty"`
ScreenX *float64 `json:"screenX,omitempty"`
Width *float64 `json:"width,omitempty"`
}
type ProfileFingerprintHeaders ¶
type ProfileFingerprintHeaders struct {
Accept *string `json:"accept,omitempty"`
AcceptEncoding *string `json:"accept-encoding,omitempty"`
AcceptLanguage *string `json:"accept-language,omitempty"`
Dnt *string `json:"dnt,omitempty"`
SecChUa *string `json:"sec-ch-ua,omitempty"`
SecChUaMobile *string `json:"sec-ch-ua-mobile,omitempty"`
SecChUaPlatform *string `json:"sec-ch-ua-platform,omitempty"`
SecFetchDest *string `json:"sec-fetch-dest,omitempty"`
SecFetchMode *string `json:"sec-fetch-mode,omitempty"`
SecFetchSite *string `json:"sec-fetch-site,omitempty"`
SecFetchUser *string `json:"sec-fetch-user,omitempty"`
UpgradeInsecureRequests *string `json:"upgrade-insecure-requests,omitempty"`
UserAgent *string `json:"user-agent,omitempty"`
}
type ProfileGetParams ¶
type ProfileGetParams struct {
ProjectID *string `json:"projectId,omitempty"`
}
type ProfileGetResponse ¶
type ProfileGetResponse struct {
// The date and time when the profile was created
CreatedAt time.Time `json:"createdAt"`
// The credentials configuration associated with the profile
CredentialsConfig interface{} `json:"credentialsConfig"`
// The dimensions associated with the profile
Dimensions *Dimensions5 `json:"dimensions,omitempty"`
// The extension IDs associated with the profile
ExtensionIDs *[]string `json:"extensionIds,omitempty"`
// The fingerprint associated with the profile
Fingerprint *Fingerprint2 `json:"fingerprint,omitempty"`
// The unique identifier for the profile
ID string `json:"id"`
// The project ID associated with the profile
ProjectID *string `json:"projectId,omitempty"`
// The last session ID associated with the profile
SourceSessionID *string `json:"sourceSessionId,omitempty"`
// The status of the profile
Status ProfileStatus `json:"status"`
// The date and time when the profile was last updated
UpdatedAt time.Time `json:"updatedAt"`
// The proxy configuration associated with the profile
UseProxyConfig interface{} `json:"useProxyConfig"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
}
type ProfileListParams ¶
type ProfileListParams struct {
ProjectID *string `json:"projectId,omitempty"`
}
type ProfileListResponse ¶
type ProfileListResponseProfilesItemStatus ¶
type ProfileListResponseProfilesItemStatus string
const ( ProfileListResponseProfilesItemStatusUploading ProfileListResponseProfilesItemStatus = "UPLOADING" ProfileListResponseProfilesItemStatusReady ProfileListResponseProfilesItemStatus = "READY" ProfileListResponseProfilesItemStatusFailed ProfileListResponseProfilesItemStatus = "FAILED" )
type ProfileStatus ¶
type ProfileStatus string
const ( ProfileStatusUploading ProfileStatus = "UPLOADING" ProfileStatusReady ProfileStatus = "READY" ProfileStatusFailed ProfileStatus = "FAILED" )
type ProfileUpdateParams ¶
type ProfileUpdateParams struct {
// The dimensions associated with the profile
Dimensions *Dimensions6 `json:"dimensions,omitempty"`
// Project to create the profile in
ProjectID *string `json:"projectId,omitempty"`
// The proxy associated with the profile
ProxyURL *string `json:"proxyUrl,omitempty"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
// The user data directory associated with the profile
UserDataDir FileUpload `json:"userDataDir"`
}
type ProfileUpdateQueryParams ¶
type ProfileUpdateQueryParams struct {
ProjectID *string `json:"projectId,omitempty"`
}
type ProfileUpdateResponse ¶
type ProfileUpdateResponse struct {
// The date and time when the profile was created
CreatedAt time.Time `json:"createdAt"`
// The credentials configuration associated with the profile
CredentialsConfig interface{} `json:"credentialsConfig"`
// The dimensions associated with the profile
Dimensions *Dimensions7 `json:"dimensions,omitempty"`
// The extension IDs associated with the profile
ExtensionIDs *[]string `json:"extensionIds,omitempty"`
// The fingerprint associated with the profile
Fingerprint *Fingerprint3 `json:"fingerprint,omitempty"`
// The unique identifier for the profile
ID string `json:"id"`
// The project ID associated with the profile
ProjectID *string `json:"projectId,omitempty"`
// The last session ID associated with the profile
SourceSessionID *string `json:"sourceSessionId,omitempty"`
// The status of the profile
Status ProfileStatus `json:"status"`
// The date and time when the profile was last updated
UpdatedAt time.Time `json:"updatedAt"`
// The proxy configuration associated with the profile
UseProxyConfig interface{} `json:"useProxyConfig"`
// The user agent associated with the profile
UserAgent *string `json:"userAgent,omitempty"`
}
type Profiles ¶
type Profiles struct {
// contains filtered or unexported fields
}
func (*Profiles) Create ¶
func (r *Profiles) Create(ctx context.Context, body ProfileCreateParams, opts ...RequestOption) (*ProfileCreateResponse, error)
Create a profile
func (*Profiles) Get ¶
func (r *Profiles) Get(ctx context.Context, id string, params ProfileGetParams, opts ...RequestOption) (*ProfileGetResponse, error)
Get a profile
func (*Profiles) List ¶
func (r *Profiles) List(ctx context.Context, params ProfileListParams, opts ...RequestOption) (*ProfileListResponse, error)
List all profiles
func (*Profiles) Update ¶
func (r *Profiles) Update(ctx context.Context, id string, body ProfileUpdateParams, params ProfileUpdateQueryParams, opts ...RequestOption) (*ProfileUpdateResponse, error)
Update a profile
type RateLimitError ¶
type RateLimitError struct{ *APIError }
type RequestOption ¶
type RequestOption func(*requestConfig)
func WithIdempotencyKey ¶
func WithIdempotencyKey(key string) RequestOption
func WithRequestHeader ¶
func WithRequestHeader(key, value string) RequestOption
func WithRequestMaxRetries ¶
func WithRequestMaxRetries(maxRetries int) RequestOption
func WithRequestQuery ¶
func WithRequestQuery(key, value string) RequestOption
func WithRequestTimeout ¶
func WithRequestTimeout(timeout time.Duration) RequestOption
func WithResponseInto ¶
func WithResponseInto(dst **http.Response) RequestOption
type ScrapeRequestFormatItem ¶
type ScrapeRequestFormatItem string
const ( ScrapeRequestFormatItemHTML ScrapeRequestFormatItem = "html" ScrapeRequestFormatItemReadability ScrapeRequestFormatItem = "readability" ScrapeRequestFormatItemCleanedHTML ScrapeRequestFormatItem = "cleaned_html" ScrapeRequestFormatItemMarkdown ScrapeRequestFormatItem = "markdown" )
type ScrapeResponse ¶
type ScrapeResponse struct {
Content Content `json:"content"`
Links []Link `json:"links"`
Metadata Metadata `json:"metadata"`
Pdf *Pdf `json:"pdf,omitempty"`
Screenshot *Screenshot `json:"screenshot,omitempty"`
}
ScrapeResponse Response from a successful scrape request
type Screenshot ¶
type Screenshot struct {
// URL of the screenshot image
URL string `json:"url"`
}
type ScreenshotResponse ¶
type ScreenshotResponse struct {
// URL where the screenshot is hosted
URL string `json:"url"`
}
type Scroll ¶
type Scroll struct {
Action ComputerActionRequestVariant3Action `json:"action"`
// X and Y coordinates [x, y]
Coordinates *[]float64 `json:"coordinates,omitempty"`
// Horizontal scroll amount. Defaults to 0
DeltaX *float64 `json:"delta_x,omitempty"`
// Vertical scroll amount. Defaults to 0
DeltaY *float64 `json:"delta_y,omitempty"`
// Keys to hold while scrolling
HoldKeys *[]string `json:"hold_keys,omitempty"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type Session ¶
type Session struct {
// Timestamp when the session started
CreatedAt time.Time `json:"createdAt"`
// Amount of credits consumed by the session
CreditsUsed int64 `json:"creditsUsed"`
// Configuration for the debug URL and session viewer. Controls interaction capabilities and cursor visibility.
DebugConfig *DebugConfig2 `json:"debugConfig,omitempty"`
// URL for debugging the session
DebugURL string `json:"debugUrl"`
// Device configuration for the session
DeviceConfig *DeviceConfig2 `json:"deviceConfig,omitempty"`
// Viewport and browser window dimensions for the session
Dimensions Dimensions4 `json:"dimensions"`
// Duration of the session in milliseconds
Duration int64 `json:"duration"`
// Number of events processed in the session
EventCount int64 `json:"eventCount"`
// Launch the browser in fullscreen mode, covering the full screen with no Chrome UI.
Fullscreen *bool `json:"fullscreen,omitempty"`
// Indicates if the session is headless or headful
Headless *bool `json:"headless,omitempty"`
// Unique identifier for the session
ID string `json:"id"`
// Inactivity timeout in milliseconds, if one was set when the session was created
InactivityTimeout *int64 `json:"inactivityTimeout,omitempty"`
// Indicates if Selenium is used in the session
IsSelenium *bool `json:"isSelenium,omitempty"`
// Bandwidth optimizations that were applied to the session.
OptimizeBandwidth OptimizeBandwidth `json:"optimizeBandwidth"`
// This flag will persist the profile for the session.
PersistProfile *bool `json:"persistProfile,omitempty"`
// The ID of the profile associated with the session
ProfileID *string `json:"profileId,omitempty"`
// The project associated with the session
ProjectID *string `json:"projectId,omitempty"`
// Amount of data transmitted through the proxy
ProxyBytesUsed int64 `json:"proxyBytesUsed"`
// Source of the proxy used for the session
ProxySource *SessionResponseProxySource `json:"proxySource,omitempty"`
// The region where the session was created.
Region *SessionResponseRegion `json:"region,omitempty"`
// Why the session reached a terminal state. Null while the session is live, or when the reason is unknown (e.g. sessions created before this was tracked). One of: user_requested (released via the API/SDK), timeout (hard `timeout` elapsed), inactivity_timeout (no activity for the configured window), creation_timeout (never started in time), startup_failed (could not be dispatched), browser_closed (the browser or agent closed itself — not a crash), browser_crashed (the browser crashed or its machine became unresponsive).
ReleaseReason *SessionResponseReleaseReason `json:"releaseReason,omitempty"`
// URL to view session details
SessionViewerURL string `json:"sessionViewerUrl"`
// Indicates if captcha solving is enabled
SolveCaptcha *bool `json:"solveCaptcha,omitempty"`
// Status of the session
Status SessionResponseStatus `json:"status"`
// Stealth configuration for the session
StealthConfig *StealthConfig2 `json:"stealthConfig,omitempty"`
// Session timeout duration in milliseconds
Timeout int64 `json:"timeout"`
// User agent string used in the session
UserAgent *string `json:"userAgent,omitempty"`
// URL for the session's WebSocket connection
WebsocketURL string `json:"websocketUrl"`
}
Session Represents the data structure for a browser session, including its configuration and status.
type Session2 ¶
type Session2 struct {
// Timestamp when the session started
CreatedAt time.Time `json:"createdAt"`
// Amount of credits consumed by the session
CreditsUsed int64 `json:"creditsUsed"`
// Configuration for the debug URL and session viewer. Controls interaction capabilities and cursor visibility.
DebugConfig *SessionDebugConfig `json:"debugConfig,omitempty"`
// URL for debugging the session
DebugURL string `json:"debugUrl"`
// Device configuration for the session
DeviceConfig *SessionDeviceConfig `json:"deviceConfig,omitempty"`
// Viewport and browser window dimensions for the session
Dimensions SessionDimensions `json:"dimensions"`
// Duration of the session in milliseconds
Duration int64 `json:"duration"`
// Number of events processed in the session
EventCount int64 `json:"eventCount"`
// Launch the browser in fullscreen mode, covering the full screen with no Chrome UI.
Fullscreen *bool `json:"fullscreen,omitempty"`
// Indicates if the session is headless or headful
Headless *bool `json:"headless,omitempty"`
// Unique identifier for the session
ID string `json:"id"`
// Inactivity timeout in milliseconds, if one was set when the session was created
InactivityTimeout *int64 `json:"inactivityTimeout,omitempty"`
// Indicates if Selenium is used in the session
IsSelenium *bool `json:"isSelenium,omitempty"`
// Bandwidth optimizations that were applied to the session.
OptimizeBandwidth SessionOptimizeBandwidth `json:"optimizeBandwidth"`
// This flag will persist the profile for the session.
PersistProfile *bool `json:"persistProfile,omitempty"`
// The ID of the profile associated with the session
ProfileID *string `json:"profileId,omitempty"`
// The project associated with the session
ProjectID *string `json:"projectId,omitempty"`
// Amount of data transmitted through the proxy
ProxyBytesUsed int64 `json:"proxyBytesUsed"`
// Source of the proxy used for the session
ProxySource *SessionsResponseSessionsItemProxySource `json:"proxySource,omitempty"`
// The region where the session was created.
Region *SessionsResponseSessionsItemRegion `json:"region,omitempty"`
// Why the session reached a terminal state. Null while the session is live, or when the reason is unknown (e.g. sessions created before this was tracked). One of: user_requested (released via the API/SDK), timeout (hard `timeout` elapsed), inactivity_timeout (no activity for the configured window), creation_timeout (never started in time), startup_failed (could not be dispatched), browser_closed (the browser or agent closed itself — not a crash), browser_crashed (the browser crashed or its machine became unresponsive).
ReleaseReason *SessionsResponseSessionsItemReleaseReason `json:"releaseReason,omitempty"`
// URL to view session details
SessionViewerURL string `json:"sessionViewerUrl"`
// Indicates if captcha solving is enabled
SolveCaptcha *bool `json:"solveCaptcha,omitempty"`
// Status of the session
Status SessionsResponseSessionsItemStatus `json:"status"`
// Stealth configuration for the session
StealthConfig *SessionStealthConfig `json:"stealthConfig,omitempty"`
// Session timeout duration in milliseconds
Timeout int64 `json:"timeout"`
// User agent string used in the session
UserAgent *string `json:"userAgent,omitempty"`
// URL for the session's WebSocket connection
WebsocketURL string `json:"websocketUrl"`
}
Session2 List of browser sessions
type SessionAgentLogsParams ¶
type SessionAgentLogsParams struct {
Namespace *string `json:"namespace,omitempty"`
StartTime *time.Time `json:"startTime,omitempty"`
EndTime *time.Time `json:"endTime,omitempty"`
EventTypes *[]string `json:"eventTypes,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Offset *int64 `json:"offset,omitempty"`
}
type SessionComputerParams ¶
type SessionComputerParams interface{}
type SessionComputerResponse ¶
type SessionComputerResponse struct {
// Base64 encoded screenshot if requested
Base64Image *string `json:"base64_image,omitempty"`
// Error message if action failed
Error *string `json:"error,omitempty"`
// Output message from the action
Output *string `json:"output,omitempty"`
// System information
System *string `json:"system,omitempty"`
}
type SessionContext ¶
type SessionContext struct {
// Cookies to initialize in the session
Cookies *[]Cookie `json:"cookies,omitempty"`
// Domain-specific indexedDB items to initialize in the session
IndexedDB *map[string][]IndexedDB `json:"indexedDB,omitempty"`
// Domain-specific localStorage items to initialize in the session
LocalStorage *map[string]map[string]string `json:"localStorage,omitempty"`
// Domain-specific sessionStorage items to initialize in the session
SessionStorage *map[string]map[string]string `json:"sessionStorage,omitempty"`
}
SessionContext Session context data returned from a browser session.
type SessionContext2 ¶
type SessionContext2 struct {
// Cookies to initialize in the session
Cookies *[]SessionContextCookie `json:"cookies,omitempty"`
// Domain-specific indexedDB items to initialize in the session
IndexedDB *map[string][]SessionContextIndexedDB `json:"indexedDB,omitempty"`
// Domain-specific localStorage items to initialize in the session
LocalStorage *map[string]map[string]string `json:"localStorage,omitempty"`
// Domain-specific sessionStorage items to initialize in the session
SessionStorage *map[string]map[string]string `json:"sessionStorage,omitempty"`
}
SessionContext2 Session context data to be used in the created session. Sessions will start with an empty context by default.
type SessionContextCookie ¶
type SessionContextCookie struct {
// The domain of the cookie
Domain *string `json:"domain,omitempty"`
// The expiration date of the cookie
Expires *float64 `json:"expires,omitempty"`
// Whether the cookie is HTTP only
HTTPOnly *bool `json:"httpOnly,omitempty"`
// The name of the cookie
Name string `json:"name"`
// The partition key of the cookie
PartitionKey *SessionContextCookiePartitionKey `json:"partitionKey,omitempty"`
// The path of the cookie
Path *string `json:"path,omitempty"`
// The priority of the cookie
Priority *CreateSessionRequestSessionContextCookiesItemPriority `json:"priority,omitempty"`
// Whether the cookie is a same party cookie
SameParty *bool `json:"sameParty,omitempty"`
// The same site attribute of the cookie
SameSite *CreateSessionRequestSessionContextCookiesItemSameSite `json:"sameSite,omitempty"`
// Whether the cookie is secure
Secure *bool `json:"secure,omitempty"`
// Whether the cookie is a session cookie
Session *bool `json:"session,omitempty"`
// The size of the cookie
Size *float64 `json:"size,omitempty"`
// The source port of the cookie
SourcePort *float64 `json:"sourcePort,omitempty"`
// The source scheme of the cookie
SourceScheme *CreateSessionRequestSessionContextCookiesItemSourceScheme `json:"sourceScheme,omitempty"`
// The URL of the cookie
URL *string `json:"url,omitempty"`
// The value of the cookie
Value string `json:"value"`
}
SessionContextCookie Cookies to initialize in the session
type SessionContextCookiePartitionKey ¶
type SessionContextCookiePartitionKey struct {
// Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
HasCrossSiteAncestor bool `json:"hasCrossSiteAncestor"`
// The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.
TopLevelSite string `json:"topLevelSite"`
}
SessionContextCookiePartitionKey The partition key of the cookie
type SessionContextIndexedDB ¶
type SessionContextIndexedDB struct {
Data []SessionContextIndexedDBData `json:"data"`
ID float64 `json:"id"`
Name string `json:"name"`
}
SessionContextIndexedDB Domain-specific indexedDB items to initialize in the session
type SessionContextIndexedDBData ¶
type SessionContextIndexedDBData struct {
ID float64 `json:"id"`
Name string `json:"name"`
Records []SessionContextIndexedDBDataRecord `json:"records"`
}
type SessionContextIndexedDBDataRecord ¶
type SessionContextIndexedDBDataRecord struct {
BlobFiles *[]SessionContextIndexedDBDataRecordBlobFile `json:"blobFiles,omitempty"`
Key interface{} `json:"key"`
Value interface{} `json:"value"`
}
type SessionContextResponseCookiesItemPriority ¶
type SessionContextResponseCookiesItemPriority string
const ( SessionContextResponseCookiesItemPriorityLow SessionContextResponseCookiesItemPriority = "Low" SessionContextResponseCookiesItemPriorityMedium SessionContextResponseCookiesItemPriority = "Medium" SessionContextResponseCookiesItemPriorityHigh SessionContextResponseCookiesItemPriority = "High" )
type SessionContextResponseCookiesItemSameSite ¶
type SessionContextResponseCookiesItemSameSite string
const ( SessionContextResponseCookiesItemSameSiteStrict SessionContextResponseCookiesItemSameSite = "Strict" SessionContextResponseCookiesItemSameSiteLax SessionContextResponseCookiesItemSameSite = "Lax" SessionContextResponseCookiesItemSameSiteNone SessionContextResponseCookiesItemSameSite = "None" )
type SessionContextResponseCookiesItemSourceScheme ¶
type SessionContextResponseCookiesItemSourceScheme string
const ( SessionContextResponseCookiesItemSourceSchemeUnset SessionContextResponseCookiesItemSourceScheme = "Unset" SessionContextResponseCookiesItemSourceSchemeNonSecure SessionContextResponseCookiesItemSourceScheme = "NonSecure" SessionContextResponseCookiesItemSourceSchemeSecure SessionContextResponseCookiesItemSourceScheme = "Secure" )
type SessionCostResponse ¶
type SessionCostResponse struct {
// Currency used for the cost values
Currency SessionCostResponseCurrency `json:"currency"`
// Session ID
ID string `json:"id"`
// Exact total session cost in US dollars (e.g. 0.031905), with no rounding to whole cents. Rounded only to micro-dollar precision (6 decimal places) for precise billing passthrough.
TotalCost float64 `json:"totalCost"`
// Cost unit. Values are expressed in US dollars.
Unit SessionCostResponseUnit `json:"unit"`
// Billable usage inputs used to calculate the costs
Usage Usage `json:"usage"`
}
SessionCostResponse Session cost breakdown in US dollars
type SessionCostResponseCurrency ¶
type SessionCostResponseCurrency string
const (
SessionCostResponseCurrencyUsd SessionCostResponseCurrency = "usd"
)
type SessionCostResponseUnit ¶
type SessionCostResponseUnit string
const (
SessionCostResponseUnitDollar SessionCostResponseUnit = "dollar"
)
type SessionCostResponseUsageBrowserUnit ¶
type SessionCostResponseUsageBrowserUnit string
const ( SessionCostResponseUsageBrowserUnitMinute SessionCostResponseUsageBrowserUnit = "minute" SessionCostResponseUsageBrowserUnitSecond SessionCostResponseUsageBrowserUnit = "second" )
type SessionCreateParams ¶
type SessionCreateParams struct {
// Block ads in the browser session. Default is false.
BlockAds *bool `json:"blockAds,omitempty"`
// PEM-encoded root CA certificates to trust in this session. THIS IS CURRENTLY AN EXPERIMENTAL FEATURE.
CaCertificates *[]string `json:"caCertificates,omitempty"`
// Number of sessions to create concurrently (check your plan limit)
Concurrency *int64 `json:"concurrency,omitempty"`
// Configuration for session credentials
Credentials *Credentials `json:"credentials,omitempty"`
// Configuration for the debug URL and session viewer. Controls interaction capabilities, cursor visibility, and other debug-related settings.
DebugConfig *DebugConfig `json:"debugConfig,omitempty"`
// Device configuration for the session. Specify 'mobile' for mobile device fingerprints and configurations.
DeviceConfig *DeviceConfig `json:"deviceConfig,omitempty"`
// Viewport and browser window dimensions for the session. Mobile sessions require dimensions of at least 508x1074; smaller mobile dimensions are rejected with a 400 response.
Dimensions *Dimensions `json:"dimensions,omitempty"`
// Enable experimental features for the session.
ExperimentalFeatures *[]string `json:"experimentalFeatures,omitempty"`
// Array of extension IDs to install in the session. Use ['all_ext'] to install all uploaded extensions.
ExtensionIDs *[]string `json:"extensionIds,omitempty"`
// Launch the browser in fullscreen mode, covering the full screen with no Chrome UI. Default is false.
Fullscreen *bool `json:"fullscreen,omitempty"`
// Enable headless browser mode (disable Headful mode)
Headless *bool `json:"headless,omitempty"`
// Inactivity timeout in milliseconds. When set, the session is released if no CDP command or remote input is received for this duration, even if `timeout` has not yet elapsed. Note that `timeout` remains the hard cap on session lifetime: if `inactivityTimeout` is greater than or equal to the effective `timeout`, it has no effect since `timeout` always elapses first. Omit to disable.
InactivityTimeout *int64 `json:"inactivityTimeout,omitempty"`
// Enable Selenium mode for the browser session (default is false). Use this when you plan to connect to the browser session via Selenium.
IsSelenium *bool `json:"isSelenium,omitempty"`
// The namespace the session should be created against. Defaults to "default".
Namespace *string `json:"namespace,omitempty"`
// Enable bandwidth optimizations. Passing true enables all flags (except hosts/patterns). Object allows granular control.
OptimizeBandwidth *SessionCreateParamsOptimizeBandwidth `json:"optimizeBandwidth,omitempty"`
// This flag will persist the user profile for the session.
PersistProfile *bool `json:"persistProfile,omitempty"`
// This flag will set the profile for the session.
ProfileID *string `json:"profileId,omitempty"`
// The project to create the session in. When provided, the session namespace is resolved from the project.
ProjectID *string `json:"projectId,omitempty"`
// Custom proxy URL for the browser session. Overrides useProxy, disabling Steel-provided proxies in favor of your specified proxy. Format: http(s)://username:password@hostname:port
ProxyURL *string `json:"proxyUrl,omitempty"`
// The desired region for the session. Available: us-east, us-west, us-central, eu-west, eu-central, ap-northeast, ap-southeast, sa-east. Legacy codes (iad, lax, ord) are also accepted.
Region *interface{} `json:"region,omitempty"`
// Session context data to be used in the created session. Sessions will start with an empty context by default.
SessionContext *SessionContext2 `json:"sessionContext,omitempty"`
// Optional custom UUID for the session
SessionID *string `json:"sessionId,omitempty"`
// Enable automatic captcha solving. Default is false.
SolveCaptcha *bool `json:"solveCaptcha,omitempty"`
// Stealth configuration for the session
StealthConfig *StealthConfig `json:"stealthConfig,omitempty"`
// Session timeout duration in milliseconds. Default is 300000 (5 minutes).
Timeout *int64 `json:"timeout,omitempty"`
UseProxy *interface{} `json:"useProxy,omitempty"`
// Custom user agent string for the browser session
UserAgent *string `json:"userAgent,omitempty"`
}
SessionCreateParams Request body schema for creating a new browser session.
type SessionCreateParamsOptimizeBandwidth ¶
type SessionCreateParamsOptimizeBandwidth struct {
OfBool *bool `json:"-"`
OfMap *map[string]interface{} `json:"-"`
}
func (SessionCreateParamsOptimizeBandwidth) MarshalJSON ¶
func (u SessionCreateParamsOptimizeBandwidth) MarshalJSON() ([]byte, error)
func (*SessionCreateParamsOptimizeBandwidth) UnmarshalJSON ¶
func (u *SessionCreateParamsOptimizeBandwidth) UnmarshalJSON(data []byte) error
type SessionDebugConfig ¶
type SessionDebugConfig struct {
// Whether interaction is allowed via the debug URL viewer. When false, the session viewer is view-only.
Interactive *bool `json:"interactive,omitempty"`
// Whether the OS-level mouse cursor is shown in the WebRTC stream (headful mode only).
SystemCursor *bool `json:"systemCursor,omitempty"`
}
SessionDebugConfig Configuration for the debug URL and session viewer. Controls interaction capabilities and cursor visibility.
type SessionDeviceConfig ¶
type SessionDeviceConfig struct {
Device *SessionsResponseSessionsItemDeviceConfigDevice `json:"device,omitempty"`
}
SessionDeviceConfig Device configuration for the session
type SessionDimensions ¶
type SessionDimensions struct {
// Height of the browser window
Height int64 `json:"height"`
// Width of the browser window
Width int64 `json:"width"`
}
SessionDimensions Viewport and browser window dimensions for the session
type SessionEventsParams ¶
type SessionEventsResponse ¶
type SessionEventsResponse []interface{}
SessionEventsResponse Events for a browser session
type SessionListParams ¶
type SessionListParams struct {
CursorID *string `json:"cursorId,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Status *GetSessionsStatus `json:"status,omitempty"`
ProjectID *string `json:"projectId,omitempty"`
}
type SessionLogsParams ¶
type SessionLogsParams struct {
Namespace *string `json:"namespace,omitempty"`
StartTime *time.Time `json:"startTime,omitempty"`
EndTime *time.Time `json:"endTime,omitempty"`
EventTypes *[]string `json:"eventTypes,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Offset *int64 `json:"offset,omitempty"`
}
type SessionLogsResponse ¶
type SessionOptimizeBandwidth ¶
type SessionOptimizeBandwidth struct {
BlockHosts *[]string `json:"blockHosts,omitempty"`
BlockImages *bool `json:"blockImages,omitempty"`
BlockMedia *bool `json:"blockMedia,omitempty"`
BlockStylesheets *bool `json:"blockStylesheets,omitempty"`
BlockURLPatterns *[]string `json:"blockUrlPatterns,omitempty"`
}
SessionOptimizeBandwidth Bandwidth optimizations that were applied to the session.
type SessionReleaseAllParams ¶
type SessionReleaseAllParams map[string]interface{}
type SessionReleaseAllQueryParams ¶
type SessionReleaseAllQueryParams struct {
ProjectID *string `json:"projectId,omitempty"`
}
type SessionReleaseAllResponse ¶
type SessionReleaseAllResponse struct {
// Details about the outcome of the release operation
Message string `json:"message"`
// Indicates if the sessions were successfully released
Success bool `json:"success"`
}
SessionReleaseAllResponse Response for releasing multiple sessions.
type SessionReleaseParams ¶
type SessionReleaseParams map[string]interface{}
type SessionReleaseResponse ¶
type SessionReleaseResponse struct {
// Details about the outcome of the release operation
Message string `json:"message"`
// Indicates if the session was successfully released
Success bool `json:"success"`
}
SessionReleaseResponse Response for releasing a single session.
type SessionResponseDeviceConfigDevice ¶
type SessionResponseDeviceConfigDevice string
const ( SessionResponseDeviceConfigDeviceDesktop SessionResponseDeviceConfigDevice = "desktop" SessionResponseDeviceConfigDeviceMobile SessionResponseDeviceConfigDevice = "mobile" )
type SessionResponseProxySource ¶
type SessionResponseProxySource string
const ( SessionResponseProxySourceSteel SessionResponseProxySource = "steel" SessionResponseProxySourceExternal SessionResponseProxySource = "external" )
type SessionResponseRegion ¶
type SessionResponseRegion string
const ( SessionResponseRegionLax SessionResponseRegion = "lax" SessionResponseRegionOrd SessionResponseRegion = "ord" SessionResponseRegionIad SessionResponseRegion = "iad" SessionResponseRegionScl SessionResponseRegion = "scl" SessionResponseRegionFra SessionResponseRegion = "fra" SessionResponseRegionNrt SessionResponseRegion = "nrt" SessionResponseRegionUsEast SessionResponseRegion = "us-east" SessionResponseRegionUsWest SessionResponseRegion = "us-west" SessionResponseRegionUsCentral SessionResponseRegion = "us-central" SessionResponseRegionEuWest SessionResponseRegion = "eu-west" SessionResponseRegionEuCentral SessionResponseRegion = "eu-central" SessionResponseRegionApNortheast SessionResponseRegion = "ap-northeast" SessionResponseRegionApSoutheast SessionResponseRegion = "ap-southeast" SessionResponseRegionSaEast SessionResponseRegion = "sa-east" )
type SessionResponseReleaseReason ¶
type SessionResponseReleaseReason string
const ( SessionResponseReleaseReasonUserRequested SessionResponseReleaseReason = "user_requested" SessionResponseReleaseReasonTimeout SessionResponseReleaseReason = "timeout" SessionResponseReleaseReasonInactivityTimeout SessionResponseReleaseReason = "inactivity_timeout" SessionResponseReleaseReasonCreationTimeout SessionResponseReleaseReason = "creation_timeout" SessionResponseReleaseReasonStartupFailed SessionResponseReleaseReason = "startup_failed" SessionResponseReleaseReasonBrowserClosed SessionResponseReleaseReason = "browser_closed" SessionResponseReleaseReasonBrowserCrashed SessionResponseReleaseReason = "browser_crashed" )
type SessionResponseStatus ¶
type SessionResponseStatus string
const ( SessionResponseStatusLive SessionResponseStatus = "live" SessionResponseStatusReleased SessionResponseStatus = "released" SessionResponseStatusFailed SessionResponseStatus = "failed" )
type SessionStealthConfig ¶
type SessionStealthConfig struct {
// When true, captchas will be automatically solved when detected. When false, use the solve endpoints to manually initiate solving.
AutoCaptchaSolving *bool `json:"autoCaptchaSolving,omitempty"`
// This flag will make the browser act more human-like by moving the mouse in a more natural way
HumanizeInteractions *bool `json:"humanizeInteractions,omitempty"`
// This flag will skip the fingerprint generation for the session.
SkipFingerprintInjection *bool `json:"skipFingerprintInjection,omitempty"`
}
SessionStealthConfig Stealth configuration for the session
type Sessions ¶
type Sessions struct {
Captchas *SessionsCaptchas
Files *SessionsFiles
// contains filtered or unexported fields
}
func (*Sessions) AgentLogs ¶
func (r *Sessions) AgentLogs(ctx context.Context, id string, params SessionAgentLogsParams, opts ...RequestOption) (*SessionAgentLogsResponse, error)
Get session agent logs
func (*Sessions) AgentTraces ¶
func (r *Sessions) AgentTraces(ctx context.Context, id string, params SessionAgentTracesParams, opts ...RequestOption) (*SessionAgentTracesResponse, error)
Get session agent traces
func (*Sessions) Computer ¶
func (r *Sessions) Computer(ctx context.Context, sessionID string, body SessionComputerParams, opts ...RequestOption) (*SessionComputerResponse, error)
Execute computer action
func (*Sessions) Context ¶
func (r *Sessions) Context(ctx context.Context, id string, opts ...RequestOption) (*SessionContext, error)
Get session context
func (*Sessions) Cost ¶
func (r *Sessions) Cost(ctx context.Context, id string, opts ...RequestOption) (*SessionCostResponse, error)
Get session cost
func (*Sessions) Create ¶
func (r *Sessions) Create(ctx context.Context, body SessionCreateParams, opts ...RequestOption) (*Session, error)
Create a session
func (*Sessions) Events ¶
func (r *Sessions) Events(ctx context.Context, id string, params SessionEventsParams, opts ...RequestOption) (*SessionEventsResponse, error)
Get recorded events
func (*Sessions) List ¶
func (r *Sessions) List(ctx context.Context, params SessionListParams, opts ...RequestOption) (*CursorPage[Session2], error)
List all sessions
func (*Sessions) ListAutoPaging ¶
func (r *Sessions) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...RequestOption) *CursorPageAutoPager[Session2]
func (*Sessions) LiveDetails ¶
func (r *Sessions) LiveDetails(ctx context.Context, id string, opts ...RequestOption) (*SessionLiveDetailsResponse, error)
Get live session details
func (*Sessions) Logs ¶
func (r *Sessions) Logs(ctx context.Context, id string, params SessionLogsParams, opts ...RequestOption) (*SessionLogsResponse, error)
Get session logs
func (*Sessions) Release ¶
func (r *Sessions) Release(ctx context.Context, id string, body SessionReleaseParams, opts ...RequestOption) (*SessionReleaseResponse, error)
Release a session
func (*Sessions) ReleaseAll ¶
func (r *Sessions) ReleaseAll(ctx context.Context, body SessionReleaseAllParams, params SessionReleaseAllQueryParams, opts ...RequestOption) (*SessionReleaseAllResponse, error)
Release all sessions
type SessionsCaptchas ¶
type SessionsCaptchas struct {
// contains filtered or unexported fields
}
func (*SessionsCaptchas) Solve ¶
func (r *SessionsCaptchas) Solve(ctx context.Context, sessionID string, body CaptchaSolveParams, opts ...RequestOption) (*CaptchaSolveResponse, error)
Solve captcha(s)
func (*SessionsCaptchas) SolveImage ¶
func (r *SessionsCaptchas) SolveImage(ctx context.Context, sessionID string, body CaptchaSolveImageParams, opts ...RequestOption) (*CaptchaSolveImageResponse, error)
Solve image captcha
func (*SessionsCaptchas) Status ¶
func (r *SessionsCaptchas) Status(ctx context.Context, sessionID string, opts ...RequestOption) (*CaptchaStatusResponse, error)
Get captcha status
type SessionsFiles ¶
type SessionsFiles struct {
// contains filtered or unexported fields
}
func (*SessionsFiles) Delete ¶
func (r *SessionsFiles) Delete(ctx context.Context, sessionID string, path string, opts ...RequestOption) (*interface{}, error)
Delete a file
func (*SessionsFiles) DeleteAll ¶
func (r *SessionsFiles) DeleteAll(ctx context.Context, sessionID string, opts ...RequestOption) (*interface{}, error)
Delete all files
func (*SessionsFiles) Download ¶
func (r *SessionsFiles) Download(ctx context.Context, sessionID string, path string, opts ...RequestOption) ([]byte, error)
Download a file
func (*SessionsFiles) DownloadArchive ¶
func (r *SessionsFiles) DownloadArchive(ctx context.Context, sessionID string, opts ...RequestOption) ([]byte, error)
Download archive
func (*SessionsFiles) List ¶
func (r *SessionsFiles) List(ctx context.Context, sessionID string, opts ...RequestOption) (*Fileslist, error)
List files
func (*SessionsFiles) Upload ¶
func (r *SessionsFiles) Upload(ctx context.Context, sessionID string, body FileUploadParams2, opts ...RequestOption) (*File, error)
Upload a file
type SessionsResponseSessionsItemDeviceConfigDevice ¶
type SessionsResponseSessionsItemDeviceConfigDevice string
const ( SessionsResponseSessionsItemDeviceConfigDeviceDesktop SessionsResponseSessionsItemDeviceConfigDevice = "desktop" SessionsResponseSessionsItemDeviceConfigDeviceMobile SessionsResponseSessionsItemDeviceConfigDevice = "mobile" )
type SessionsResponseSessionsItemProxySource ¶
type SessionsResponseSessionsItemProxySource string
const ( SessionsResponseSessionsItemProxySourceSteel SessionsResponseSessionsItemProxySource = "steel" SessionsResponseSessionsItemProxySourceExternal SessionsResponseSessionsItemProxySource = "external" )
type SessionsResponseSessionsItemRegion ¶
type SessionsResponseSessionsItemRegion string
const ( SessionsResponseSessionsItemRegionLax SessionsResponseSessionsItemRegion = "lax" SessionsResponseSessionsItemRegionOrd SessionsResponseSessionsItemRegion = "ord" SessionsResponseSessionsItemRegionIad SessionsResponseSessionsItemRegion = "iad" SessionsResponseSessionsItemRegionScl SessionsResponseSessionsItemRegion = "scl" SessionsResponseSessionsItemRegionFra SessionsResponseSessionsItemRegion = "fra" SessionsResponseSessionsItemRegionNrt SessionsResponseSessionsItemRegion = "nrt" SessionsResponseSessionsItemRegionUsEast SessionsResponseSessionsItemRegion = "us-east" SessionsResponseSessionsItemRegionUsWest SessionsResponseSessionsItemRegion = "us-west" SessionsResponseSessionsItemRegionUsCentral SessionsResponseSessionsItemRegion = "us-central" SessionsResponseSessionsItemRegionEuWest SessionsResponseSessionsItemRegion = "eu-west" SessionsResponseSessionsItemRegionEuCentral SessionsResponseSessionsItemRegion = "eu-central" SessionsResponseSessionsItemRegionApNortheast SessionsResponseSessionsItemRegion = "ap-northeast" SessionsResponseSessionsItemRegionApSoutheast SessionsResponseSessionsItemRegion = "ap-southeast" SessionsResponseSessionsItemRegionSaEast SessionsResponseSessionsItemRegion = "sa-east" )
type SessionsResponseSessionsItemReleaseReason ¶
type SessionsResponseSessionsItemReleaseReason string
const ( SessionsResponseSessionsItemReleaseReasonUserRequested SessionsResponseSessionsItemReleaseReason = "user_requested" SessionsResponseSessionsItemReleaseReasonTimeout SessionsResponseSessionsItemReleaseReason = "timeout" SessionsResponseSessionsItemReleaseReasonInactivityTimeout SessionsResponseSessionsItemReleaseReason = "inactivity_timeout" SessionsResponseSessionsItemReleaseReasonCreationTimeout SessionsResponseSessionsItemReleaseReason = "creation_timeout" SessionsResponseSessionsItemReleaseReasonStartupFailed SessionsResponseSessionsItemReleaseReason = "startup_failed" SessionsResponseSessionsItemReleaseReasonBrowserClosed SessionsResponseSessionsItemReleaseReason = "browser_closed" SessionsResponseSessionsItemReleaseReasonBrowserCrashed SessionsResponseSessionsItemReleaseReason = "browser_crashed" )
type SessionsResponseSessionsItemStatus ¶
type SessionsResponseSessionsItemStatus string
const ( SessionsResponseSessionsItemStatusLive SessionsResponseSessionsItemStatus = "live" SessionsResponseSessionsItemStatusReleased SessionsResponseSessionsItemStatus = "released" SessionsResponseSessionsItemStatusFailed SessionsResponseSessionsItemStatus = "failed" )
type Sessionslist ¶
type Sessionslist struct {
// Cursor for the next page of results. Null if no more pages.
NextCursor *string `json:"nextCursor,omitempty"`
// List of browser sessions
Sessions []Session2 `json:"sessions"`
// Total number of sessions matching the query. Only included for filtered queries (e.g. status=live).
TotalCount *int64 `json:"totalCount,omitempty"`
}
Sessionslist Response containing a list of browser sessions with pagination details.
type StealthConfig ¶
type StealthConfig struct {
// When true, captchas will be automatically solved when detected. When false, use the solve endpoints to manually initiate solving.
AutoCaptchaSolving *bool `json:"autoCaptchaSolving,omitempty"`
// This flag will make the browser act more human-like by moving the mouse in a more natural way.
HumanizeInteractions *bool `json:"humanizeInteractions,omitempty"`
// This flag will skip the fingerprint generation for the session.
SkipFingerprintInjection *bool `json:"skipFingerprintInjection,omitempty"`
}
StealthConfig Stealth configuration for the session
type StealthConfig2 ¶
type StealthConfig2 struct {
// When true, captchas will be automatically solved when detected. When false, use the solve endpoints to manually initiate solving.
AutoCaptchaSolving *bool `json:"autoCaptchaSolving,omitempty"`
// This flag will make the browser act more human-like by moving the mouse in a more natural way
HumanizeInteractions *bool `json:"humanizeInteractions,omitempty"`
// This flag will skip the fingerprint generation for the session.
SkipFingerprintInjection *bool `json:"skipFingerprintInjection,omitempty"`
}
StealthConfig2 Stealth configuration for the session
type TakeScreenshot ¶
type TakeScreenshot struct {
Action ComputerActionRequestVariant7Action `json:"action"`
}
type TypeText ¶
type TypeText struct {
Action ComputerActionRequestVariant5Action `json:"action"`
// Keys to hold while typing
HoldKeys *[]string `json:"hold_keys,omitempty"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
// Text to type
Text string `json:"text"`
}
type UnprocessableEntityError ¶
type UnprocessableEntityError struct{ *APIError }
type Usage ¶
type Usage struct {
Browser UsageBrowser `json:"browser"`
Captcha UsageCaptcha `json:"captcha"`
Proxy UsageProxy `json:"proxy"`
}
Usage Billable usage inputs used to calculate the costs
type UsageBrowser ¶
type UsageBrowser struct {
// Billing unit for browser usage
Unit SessionCostResponseUsageBrowserUnit `json:"unit"`
// Billable browser usage value
Value float64 `json:"value"`
}
type UsageCaptcha ¶
type UsageCaptcha struct {
// Billable captcha solves
Solves int64 `json:"solves"`
}
type UsageProxy ¶
type UsageProxy struct {
// Billable Steel proxy bytes for the session
Bytes int64 `json:"bytes"`
}
type Wait ¶
type Wait struct {
Action ComputerActionRequestVariant6Action `json:"action"`
// Duration to wait in seconds
Duration float64 `json:"duration"`
// Whether to take a screenshot after the action
Screenshot *bool `json:"screenshot,omitempty"`
}
type WellKnown ¶
type WellKnown struct {
// contains filtered or unexported fields
}
func (*WellKnown) List ¶
func (r *WellKnown) List(ctx context.Context, opts ...RequestOption) (*WellknownListResponse, error)
Get Public Keys (JWKS)
type WellknownListResponse ¶
type WellknownListResponse struct {
// A list of JSON Web Keys.
Keys []Key `json:"keys"`
}
WellknownListResponse A JSON Web Key Set (JWKS) containing a list of public keys.