13 Jun, 2024 - About 2 minutes
Serper
Intro
serper is an API service that provides you fast results from Google Search
Features
- Response Time: Queries are generally returned within 1 to 2 seconds; occasionally, it can take 2 to 4 seconds if a retry is needed.
- Query Rate Limit: The default limit for Ultimate credits is 300 queries per second, allowing 15,000 to 18,000 searches per minute. Higher concurrency limits are available upon request.
- Real-Time Queries: All API calls query Google directly for the latest results with no caching involved.
Search Query Customization: Users can specify search locations by country, language, and specific areas such as cities or neighborhoods. - Credit Deduction: Credits are deducted for each successful query response. When the credit balance is zero, new queries will not be accepted.
Example
Create the following python file test.py
import requests |
You can clone the following repo which as this example code.
git clone git@github.com:rramos/serper-test.git |
NOTE: Make sure to update the
.env
value with your API KEY
Playground
On the provided Playground, you will find several examples for multiple languages and various options to apply on your request.
Dashboard
The Dashboard provides you with great visibility on the credits consumption
Langchain Integration
There is a Langchain wrapper if you would like to incorporate the search results.
Here is one example using Ollama. Check the following article if you would like to setup Ollama locally.
import os |
Conclusion
This service is incredible, offering blazing fast results with real-time queries and a user-friendly interface. The dashboard and playground provide all the information you need to get started in a raw simple form which I really like. As for pricing, it’s essential to calculate your costs to determine if integrating this service into your product is cost-effective.