Anmelden

API-Nutzung

Fügen Sie &scraper=quora-question zu einer Crawling API-Anfrage hinzu. URL-kodieren Sie die Ziel-URL im url-Parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.quora.com/Which-is-the-best-tool-for-scraping-customer-reviews' \
  --data-urlencode 'scraper=quora-question' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.quora.com/Which-is-the-best-tool-for-scraping-customer-reviews',
    {'scraper': 'quora-question'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.quora.com/Which-is-the-best-tool-for-scraping-customer-reviews',
  { scraper: 'quora-question' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.quora.com/Which-is-the-best-tool-for-scraping-customer-reviews', scraper: 'quora-question')
data = JSON.parse(res.body)

Beispiel-Eingabe-URL

Die im url-Parameter übergebene URL (zur besseren Lesbarkeit URL-dekodiert):

https://www.quora.com/Which-is-the-best-tool-for-scraping-customer-reviews

Response-Struktur

JSON-Response-Body. Feldtypen können null sein, wenn die Quellseite den Wert auslässt.

question_title
string
Fragentitel.
question_details
string | null
Zusätzliche Frage-Details.
tags
array
Themen-Tags.
answer_count
integer
Antworten insgesamt.
follower_count
integer
Anzahl der Follower.
view_count
integer | null
Aufrufe insgesamt.
answers
array
Antwort-Objekte.
answers[].author_name
string
Autor der Antwort.
answers[].author_credentials
string | null
Zeile mit Autoren-Credentials.
answers[].body
string
Antworttext.
answers[].upvotes
integer
Anzahl der Upvotes.
related_questions
array
URLs und Titel verwandter Fragen.

Beispiel-Response

{
  "question_title": "Which is the best tool for scraping customer reviews?",
  "answer_count": 14,
  "follower_count": 42,
  "answers": [
    {
      "author_name": "John Smith",
      "author_credentials": "Data Engineer",
      "upvotes": 218
    }
  ]
}