Documentation Index Fetch the complete documentation index at: https://docs.fetchserp.com/llms.txt
Use this file to discover all available pages before exploring further.
Choose the SDK that fits your stack and start coding in seconds.
JavaScript / TypeScript npm, pnpm, Yarn – your choice
Python Clean & Pythonic API
Ruby Lightweight & hand-crafted
JavaScript / TypeScript
npm install fetchserp
# or
yarn add fetchserp
import FetchSERP from 'fetchserp' ;
const client = new FetchSERP ( 'YOUR_API_TOKEN' );
const serp = await client . serp ({
query: 'serp api' ,
search_engine: 'google' ,
country: 'us' ,
pages_number: 1
});
console . log ( serp . data . results );
Python
from fetchserp import FetchSERP
client = FetchSERP( 'YOUR_API_TOKEN' )
results = client.serp( query = 'serp api' , search_engine = 'google' , country = 'us' , pages_number = 1 )
print (results[ 'data' ][ 'results' ])
Ruby
require 'fetchserp'
client = FetchSERP :: Client . new ( api_key: 'YOUR_API_TOKEN' )
results = client. serp ( query: 'serp api' , search_engine: 'google' , country: 'us' , pages_number: 1 )
puts results[ 'data' ][ 'results' ]
Available Methods
All SDKs expose a 1-to-1 mapping between helper methods and API endpoints:
serp(query, search_engine="google", country="us", pages_number=1)
ranking(domain, keyword, search_engine="google", country="us")
serp_html(...)
serp_text(...)
serp_js(...)
serp_ai(...)
page_indexation(...)
keywords_search_volume(keywords, country="us")
keywords_suggestions(keywords=None, url=None, country="us")
long_tail_keywords_generator(keyword, search_intent="informational", count=10)
backlinks(domain, pages_number=1)
web_page_seo_analysis(url)
web_page_ai_analysis(url, prompt)
...etc
Each method returns the raw JSON the API responds with, along with HTTP metadata.
Contributing & Support
All SDKs are open source on our GitHub organization . Feel free to open issues or PRs.
Need an SDK in another language? Open a feature request or reach out to support@fetchserp.com .