发送您的第一次请求

使用 Thordata 的 SERP API 发送您的第一个请求。在开始之前,您需要 API Token。

  1. 您可以在 [定价] 页面上获得免费试用。

  2. 然后,在 [API Playground] >“Token” 下复制您的凭证。

代码示例: 获取 API 凭证后,使用以下代码发送您的第一个请求:【记得将代码示例中的“Token”替换为属于您自己的token】

curl https://scraperapi.thordata.com/request -H "Content-Type: application/json" -H "Authorization: Bearer Token" -d "{\"url\": \"https://www.google.com/search?q=pizza^&json=1\"}"

发送请求后,API将返回JSON/HTML格式的输出结果:

organic: [
  {
    description: "Experimente as melhores pizzas da Pizza Hut. Descubra ofertas, cardápios e lojas próximas. Delivery ou retirada disponíveis. Aproveite!",
    display_link: "https://pizzahut.com.br",
    global_rank: 1,
    link: "https://pizzahut.com.br/",
    rank: 1,
    title: "Pizza Hut Brasil: Ofertas, Cardápios e Delivery!"
  },
  {
    description: "Faça o seu pedido online na maior pizzaria do mundo! Diversos tipos de pizzas, combos e promoções para você escolher. Peça agora a sua Domino's quentinha no ...",
    display_link: "https://www.dominos.com.br",
    global_rank: 2,
    link: "https://www.dominos.com.br/",
    rank: 2,
    title: "Domino's Pizza - A Maior Pizzaria do Mundo"
  },
  {
    description: "Comece dissolvendo o fermento, sal e açúcar na água morna, antes de misturar com a farinha, óleo e cachaça, formando uma massa de pizza macia e elástica.",
    display_link: "https://www.tudogostoso.com.br › receita › 324-massa-...",
    extensions: [
      {
        text: "4,6(1.621)",
        type: "rating"
      },
      {
        text: "15 min",
        type: "text"
      }
    ],
    global_rank: 3,
    image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3N
    zc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N...

如需进一步帮助,请通过 support@thordata.com 联系我们。

Last updated

Was this helpful?