Skip to content

Move client tracking from the source parameter to the User-Agent header - #50

Merged
jvmvik merged 3 commits into
masterfrom
user-agent
Nov 30, 2026
Merged

jvmvik merged 3 commits into
masterfrom
user-agent

Conversation

@strzibny

@strzibny strzibny commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Let's start tracking the library version using the User-Agent header with its Ruby runtime and platform:

serpapi-ruby/1.0.3 ruby/3.4.1 (darwin; arm64)

We'll discontinued source and unify how our SDK libraries report their usage starting with the next serpapi-ruby 2.0 release.

PR done with Opus 5.5 Extra High.

Send the library version, Ruby runtime, and platform in the User-Agent header, e.g. serpapi-ruby/1.0.3 ruby/3.4.1 (darwin; arm64), instead of the source query parameter. Requests previously used the http.rb default User-Agent.

Co-authored-by: Claude Opus 5.5 (max effort) <noreply@anthropic.com>

@jvmvik jvmvik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Library version was not update contrary to the commit message.
also, user_agent should be regular public method not a class method.
This is fixed in the next commit.

@jvmvik
jvmvik merged commit 4b42dbe into master Nov 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants