Quickstart
Get up and running with Serply API in just a few minutes.
Production Endpoint
All API requests should be made to:
https://api.serply.io
Making Your First API Request
An API key is a token that you provide when making API calls. Include the token in a header parameter called X-Api-Key.
Using cURL
curl --header 'X-Api-Key: YOUR_API_KEY' \
'https://api.serply.io/v1/search/?q=google+search+api'
Using JavaScript/Node.js
const response = await fetch('https://api.serply.io/v1/search/?q=google+search+api', {
headers: {
'X-Api-Key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
Using Python
import requests
from urllib.parse import quote_plus
query = quote_plus('google search api')
response = requests.get(
f'https://api.serply.io/v1/search/?q={query}',
headers={'X-Api-Key': 'YOUR_API_KEY'}
)
data = response.json()
print(data)
Send the query as
?q=. The older/q=spelling, with the query packed into the path, is still accepted and returns the same results, but it cannot carry every query. A literal%in the search text returns a 400, and a?or#truncates the query there and silently drops the parameters that follow, so/v1/search/q=C%23+tutorial&num=5searches forCand ignoresnum. The?q=form handles all three correctly. Google Maps is the one endpoint that takes its search text as a path segment instead ofq; see the Google Maps reference.
Getting Your API Key
- Sign up at app.serply.io
- Navigate to your dashboard
- Copy your API key from the settings page
You can view and manage your API keys in the Dashboard.
What's Next?
- Learn about Authentication methods
- Explore our code examples for various programming languages
- Check out the API Reference for all available endpoints