Start using the fetchSERP API in minutes
export FETCHSERP_API_TOKEN="YOUR_API_TOKEN"
curl -X GET "https://www.fetchserp.com/api/v1/serp" \ -G \ -d "search_engine=google" \ -d "country=us" \ -d "pages_number=1" \ -d "query=serp+api" \ -H "accept: application/json" \ -H "authorization: Bearer $FETCHSERP_API_TOKEN"
npm install fetchserp
import FetchSERP from 'fetchserp'; const client = new FetchSERP(process.env.FETCHSERP_API_TOKEN); const results = await client.serp({ query: 'serp api', search_engine: 'google', country: 'us', pages_number: 1 }); console.log(results.data);
pip install fetchserp
from fetchserp import FetchSERP client = FetchSERP() client.api_key = os.environ['FETCHSERP_API_TOKEN'] results = client.serp(query="serp api", search_engine="google", country="us", pages_number=1) print(results["data"])
gem install fetchserp
require 'fetchserp' client = FetchSERP::Client.new(api_key: ENV['FETCHSERP_API_TOKEN']) results = client.serp(query: 'serp api', search_engine: 'google', country: 'us', pages_number: 1) puts results['data']
const claudeRequest = { model: 'claude-sonnet-4-20250514', messages: [{ role: 'user', content: 'Show me the top keywords for fetchserp.com' }], mcp_servers: [ { type: 'url', url: 'https://www.fetchserp.com/mcp', name: 'fetchserp', authorization_token: process.env.FETCHSERP_API_TOKEN, tool_configuration: { enabled: true } } ] };
let response = await openai.responses.create({ model: 'gpt-4o', tools: [ { type: 'mcp', server_label: 'fetchserp', server_url: process.env.MCP_SERVER_URL, headers: { Authorization: `Bearer ${process.env.FETCHSERP_API_TOKEN}` } } ], input: 'Find low-competition keywords for "seo api"' });