easy api下载_使用Zenserp的Easy Google Search Result API

easy api下载

No matter how much experience I gain in this industry, one task I continue to fail at is building an accurate, flexible, and maintainable scraper for site search. As soon as sites change their HTML structure, my scrape is borked. When looking to build my own search results page, I looked around and the best solution I found was Zenserp. Zenserp, created by Saas Industries, is an easy to use, logical SERP API for getting customizable Google search results!

无论我在该行业中积累了多少经验,我继续失败的任务之一就是为站点搜索构建一个准确,灵活且可维护的刮板。 网站更改HTML结构后,我的想法就不妙了。 当寻找建立自己的搜索结果页面时,我环顾四周,发现的最佳解决方案是Zenserp 。 由Saas Industries创建的Zenserp是易于使用的逻辑SERP API,用于获取可定制的Google搜索结果!

快速点击 (Quick Hits)

  • Rolling your own SERP is verify difficult and impossible to maintain (think proxy networks and CAPTCHAs) -- trust Zenserp to do it for you

    滚动自己的SERP证明难以维护且无法维护(请考虑代理网络和验证码)-相信Zenserp可以为您完成

  • API payloads are logical and easy to use

    API有效负载逻辑合理且易于使用
  • Get multiple data types: organic, paid, local, maps, and more

    获取多种数据类型:自然数据,付费数据,本地数据,地图等
  • Zenserp does not store or sell your query requests

    Zenserp不存储或出售您的查询请求

  • Very strong infrastructure - no QPS limit!

    强大的基础架构-没有QPS限制!
  • Provides a method for bulk data retrieval to consolidate API requests

    提供一种用于批量数据检索的方法来合并API请求
  • Free to start!

    免费开始!

Let's have a look at using Zenserp's API!

让我们来看看使用Zenserp的API!

使用zenserp (Using zenserp)

After signing up for a free Zenserp account, you can start making requests. zenserp even has a nice question builder that allows you to export search code in cURL, Python, PHP, or Node.js:

注册免费的Zenserp帐户后,您可以开始提出请求。 zenserp甚至还有一个很好的问题生成器,可让您导出cURL,Python,PHP或Node.js中的搜索代码:

Note: the API key used here was rotated and will no longer work

注意:此处使用的API密钥已旋转,将不再起作用

Note the available options: the search phrase, location requesting from, which Google domain you prefer, and language. Additional options include whether you want a text or image search, the number of results, and which page of results (page 1, page 2, etc.) you'd like. Super customizable!

请注意可用的选项:搜索词组,从中请求位置,您首选的Google域以及语言。 其他选项包括您要进行文本搜索还是图像搜索,结果数量以及想要的结果页面(第1页,第2页等)。 超级可定制!

Let's have a look at the resulting payload:

让我们看一下产生的有效负载:

{
  "query": {
    "q": "david walsh blog",
    "hl": "en",
    "gl": "US",
    "location": "United States",
    "search_engine": "google.com",
    "apikey": "MY_API_KEY",
    "url": "https://google.com/search?q=david+walsh+blog&uule=w+CAIQICINVW5pdGVkIFN0YXRlcw&hl=en&gl=US&sourceid=chrome&ie=UTF-8"
  },
  "organic": [
    {
      "position": 1,
      "title": "David Walsh Blog - JavaScript Consultant",
      "url": "https://davidwalsh.name/",
      "destination": "https://davidwalsh.name",
      "description": "A blog featuring tutorials about JavaScript, HTML5, AJAX, PHP, CSS, WordPress, and everything else development.",
      "isAmp": false,
      "sitelinks": [
        {
          "title": "About David Walsh",
          "description": "David Walsh. My name is David Walsh. I'm a 33-year old web ...",
          "url": "https://davidwalsh.name/about-david-walsh"
        },
        {
          "title": "7 Essential JavaScript Functions",
          "description": "Seven JavaScript functions that every developer should keep ...",
          "url": "https://davidwalsh.name/essential-javascript-functions"
        },
        {
          "title": "JavaScript",
          "description": "The webpack JavaScript utility has taken over the modern ...",
          "url": "https://davidwalsh.name/tutorials/javascript"
        },
        {
          "title": "Incredible Demos",
          "description": "Chris Coyier's Favorite CodePen Demos IV. Did you know you ...",
          "url": "https://davidwalsh.name/tutorials/demos"
        },
        {
          "title": "Recent Tutorials",
          "description": "A blog featuring tutorials about JavaScript, HTML5, AJAX, PHP ...",
          "url": "https://davidwalsh.name/page/2"
        },
        {
          "title": "I Don't Hate Arrow Functions",
          "description": "While arrow functions clearly have a ubiquitous community ...",
          "url": "https://davidwalsh.name/i-dont-hate-arrow-functions"
        }
      ]
    },
    {
      "position": 2,
      "title": "David Walsh Blog - Home | Facebook",
      "url": "https://www.facebook.com/davidwalshblog/",
      "destination": "https://www.facebook.com › davidwalshblog",
      "description": "David Walsh Blog, Madison. 7996 likes · 23 talking about this. David Walsh's blog about HTML5, JavaScript (MooTools, jQuery, Dojo), CSS, PHP, AJAX,...",
      "isAmp": false
    },
    {
      "position": 3,
      "title": "David Walsh Blog - Facebook",
      "url": "https://d.facebook.com/davidwalshblog/?__tn__=%2As-R",
      "destination": "https://d.facebook.com › davidwalshblog",
      "description": "David Walsh Blog, Madison, WI. 8005 likes · 7 talking about this. David Walsh's blog about HTML5, JavaScript (MooTools, jQuery, Dojo), CSS, PHP, AJAX,...",
      "isAmp": false
    },
    // ...
  ],
  "number_of_results": 32600000
}

Since I wanted organic results, the organic property provides an interesting array of results which match when I do a manual query of david walsh blog. Notice the amount of detail in the first result, especially sitelinks, which represents the sub-links you see within a manual search on Google -- wow!

因为我想要自然结果,所以organic属性提供了一组有趣的结果,这些结果与我手动查询david walsh blog时匹配。 请注意第一个结果中的详细信息量,尤其是sitelinks ,它表示您在Google手动搜索中看到的子链接-哇!

If there are paid search results, those will be in the payload as well. Let's look up bitcoin:

如果有付费搜索结果,则这些搜索结果也将在有效负载中。 让我们看一下bitcoin

{
  "query": {
    "q": "bitcoin",
    "hl": "en",
    "gl": "US",
    "location": "United States",
    "search_engine": "google.com",
    "apikey": "API_KEY",
    "url": "https://google.com/search?q=bitcoin&uule=w+CAIQICINVW5pdGVkIFN0YXRlcw&hl=en&gl=US&sourceid=chrome&ie=UTF-8"
  },
  "paid": [
    {
      "paidPosition": "top",
      "title": "Buy & Sell Bitcoin | #1 in Crypto Security & Safety | coinbase.com‎",
      "trackingUrl": "https://google.com/aclk?sa=l&ai=DChcSEwjDssyHo9HkAhUahtUKHXNyAlUYABAAGgJ3cw&sig=AOD64_1Gml8jrX5PSNhnHex8ZD2ErH6vIg&q&ved=2ahUKEwjXq8aHo9HkAhXSZVAKHXrWAUoQ0Qx6BAgVEAE&adurl",
      "destinationUrl": "https://www.coinbase.com/signup",
      "breadcrumbs": [],
      "visurl": "www.coinbase.com/",
      "description": "Coinbase is the Safest, Most Secure Place to Buy and Sell Bitcoin, Ethereum, and More. We’re Obsessed with Security So You Don’t Have to Be. Buy, Sell, and Trade Crypto Safely. iOS & Android App. Secure Storage. Over 20M+ Users. Most Trusted."
    },
    {
      "paidPosition": "top",
      "title": "Buy Bitcoin In 90 Seconds | Get Started For Free‎",
      "trackingUrl": "https://google.com/aclk?sa=l&ai=DChcSEwjDssyHo9HkAhUahtUKHXNyAlUYABABGgJ3cw&sig=AOD64_0a5ShbhklcaLMdUNRMqxNkiDtDSw&q&ved=2ahUKEwjXq8aHo9HkAhXSZVAKHXrWAUoQ0Qx6BAgWEAE&adurl",
      "destinationUrl": "https://gemini.com/",
      "breadcrumbs": [
        {
          "url": "https://exchange.gemini.com/register",
          "text": "Buy Bitcoin Instantly"
        },
        {
          "url": "https://gemini.com/",
          "text": "\"Best Crypto Exchange\""
        },
        {
          "url": "https://gemini.com/security/",
          "text": "Industry-Best Security"
        }
      ],
      "visurl": "www.gemini.com/",
      "description": "Gemini Makes Buying Bitcoin Simple, Safe & Secure. Open A Free Account Today & Start Experiencing The Future of Money! Trade In Minutes. Superior Security. Most Trusted. Free Sign Up. Services: Buy & Sell Bitcoin, Price Charts, Price Alerts, Secure Custody."
    }
  ],
  "organic": [
    {
      "position": 1,
      "isCarousel": true,
      "isVertical": false,
      "news": [
        {
          "title": "China's PBC Is Warming Up To Digital Currencies -- Good News For ...Forbes9 hours ago",
          "url": "https://www.forbes.com/sites/panosmourdoukoutas/2019/09/14/chinas-pbc-is-warming-up-to-digital-currencies-good-news-for-bitcoin-eth-xrp-and-ltc/"
        },
        {
          "title": "Bitcoin Price Indicator May Signal Next Leg HigherCoinDesk12 hours ago",
          "url": "https://www.coindesk.com/bitcoin-price-indicator-may-signal-next-leg-higher"
        },
        {
          "title": "Ethereum Network Demand Surges; Will ETH’s Price Follow?NewsBTC3 mins ago",
          "url": "https://www.newsbtc.com/2019/09/14/ethereum-network-demand-surges-will-eths-price-follow/"
        }
      ]
    },
    // ...
  ],
  "number_of_results": 513000000
}

Notice the paid key which provides results usually seen at the top of searches for which were paid for by each vendor.

请注意, paid键提供了通常在搜索顶部显示的结果,每个结果都是由每个供应商付费的。

The above queries are the simplest but only the tip of the iceberg; here are a few other valuable search options:

上面的查询是最简单的,但只是冰山一角。 以下是一些其他有价值的搜索选项:

  • device - mobile or desktop results

    device -移动或台式机结果

  • tbm - image search (isch) or maps (lcl)

    tbm图像搜索( isch )或地图( lcl )

  • timeframe - h, d, w, etc. for search results based on time units

    基于时间单位的搜索结果的时间timeframe hdw

There are loads of other customizations available to see in the Zenserp documentation.

Zenserp文档中还提供了许多其他自定义

Google趋势 (Google Trends)

Zenserp also provides a /trends API endpoint to query Google Trends:

Zenserp还提供了/trends API端点来查询Google趋势:

curl https://app.zenserp.com/api/v1/trends \
    -F "keyword[]=bitcoin" \
    -F "keyword[]=ethereum" \
    -F "apikey=YOUR-API-KEY"

Notice that you can provide multiple keywords using the array syntax!

请注意,您可以使用数组语法提供多个关键字!

用例 (Use Cases)

The obvious use case for Zenserp is creating my own custom search page but SERPs are so much more useful than that -- you could brainstorm any variety of use cases:

Zenserp的一个明显用例是创建我自己的自定义搜索页面,但SERP远比这有用得多-您可以集思广益处理各种用例:

  • Monitoring your (or the competition's) search placement for an important keyword

    监视您(或比赛)的重要关键字搜索位置
  • Tracking popular trends

    追踪流行趋势
  • Analyzing searches your users are making via your own search forms using SERP in the background

    在后台使用SERP分析用户通过自己的搜索表单进行的搜索
  • Downloading images that match a given term

    下载符合给定条件的图像
  • Tracking a given business type's density in a given area using Maps search

    使用地图搜索跟踪给定区域中给定业务类型的密度
  • ....too many to list!

    ....太多了!

As much as I love trusting my own scraping talents, it's so much easier to trust Zenserp. I save time in maintenance and get the advantage of their easy to use API and its wealth of options. The more I learn about topics in this industry, the more I've learned to delegate difficult tasks to experts. Zenserp is the my expert in Google search results APIs.

尽管我喜欢信任自己的拼才 ,但信任Zenserp却容易得多 。 我节省了维护时间,并充分利用了它们易于使用的API及其众多选项的优势。 我对这个行业的主题了解得越多,就越能将困难的任务委托给专家。 Zenserp是我在Google搜索结果API中的专家。

翻译自: https://davidwalsh.name/easy-google-search-result-api-with-zenserp

easy api下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值