seo api

免费增值
通过 Serply | 已更新 2 mesi fa | Data
人气

9.8 / 10

延迟

584ms

服务等级

98%

Health Check

N/A

返回全部教程 (3)

Using curl to call SEO API

Basic Introduction

The Search API endpoint: https://seo-api.p.rapidapi.com/v1/search/{query
For search the minimum query must have the q parameter.

The News API endpoint : https://seo-api.p.rapidapi.com/v1/news/{query

Simple Search

This example is a simple search for the keyword “president election”. The query should be properly url encoded. So the query will end up being q=president+election

curl command:
curl -H "x-rapidapi-key: CHANGE_API_KEY" -H "x-rapidapi-host: seo-api.p.rapidapi.com" https://seo-api.p.rapidapi.com/v1/search/q=president+election

Specify Number Of Results

To specify the number of results to return specify the query parameter num. To return 50 results use num=50. To return 100 use num=100. The default is 10 and the maximum is 100.

curl command to return the top 75 results:
curl -H "x-rapidapi-key: CHANGE_API_KEY" -H "x-rapidapi-host: seo-api.p.rapidapi.com" https://seo-api.p.rapidapi.com/v1/search/q=president+election&num=75

Specify a Language

Use the parameter lr to return the results in a specific language. To return results in English use lr=lang_en. To return the results in Spanish use lr=lang_es.

curl example to return results in French
curl -H "x-rapidapi-key: CHANGE_API_KEY" -H "x-rapidapi-host: seo-api.p.rapidapi.com" https://seo-api.p.rapidapi.com/v1/search/q=president+election&lr=lang_fr

Specify Country

To limit the search results from a certain location use cr. For example limit the results in the Australia use cr=AU. Or to limit the results in Canada use cr=CA.

curl example to return results in Germany
curl -H "x-rapidapi-key: CHANGE_API_KEY" -H "x-rapidapi-host: seo-api.p.rapidapi.com" https://seo-api.p.rapidapi.com/v1/search/q=president+election&cr=DE

Combine Multiple Query Parameters

All these parameters can be combined to perform advance queries.

curl to query top 100 results for the keyword “coffee” in Spain
curl -H "x-rapidapi-key: CHANGE_API_KEY" -H "x-rapidapi-host: seo-api.p.rapidapi.com" https://seo-api.p.rapidapi.com/v1/search/q=coffee&cr=ES&num=100

OpenAPI V3

The documentation for Serply is also powering this Google Search API.

Ultimate Guide To Google Search Parameters

Use this guide by Moz for more advance Google Search Parameters