Get a question and its answers
curl --request POST \
--url https://api.stophy.dev/v1/quora/question \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "https://www.quora.com/What-is-the-best-way-to-learn-programming"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({question: 'https://www.quora.com/What-is-the-best-way-to-learn-programming'})
};
fetch('https://api.stophy.dev/v1/quora/question', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/quora/question"
payload = { "question": "https://www.quora.com/What-is-the-best-way-to-learn-programming" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"question": {
"url": "<string>",
"id": "<string>",
"title": "<string>",
"answers": 0,
"topics": [
"<string>"
]
},
"answers": [
{
"id": "<string>",
"url": "<string>",
"text": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"credential": "<string>"
},
"likes": 0,
"views": 0,
"shares": 0,
"comments": 0,
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Quora
Quora question API
Call the Quora question API to get question and answers, as JSON or markdown. 2 credits.
POST
/
v1
/
quora
/
question
Get a question and its answers
curl --request POST \
--url https://api.stophy.dev/v1/quora/question \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "https://www.quora.com/What-is-the-best-way-to-learn-programming"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({question: 'https://www.quora.com/What-is-the-best-way-to-learn-programming'})
};
fetch('https://api.stophy.dev/v1/quora/question', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/quora/question"
payload = { "question": "https://www.quora.com/What-is-the-best-way-to-learn-programming" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"question": {
"url": "<string>",
"id": "<string>",
"title": "<string>",
"answers": 0,
"topics": [
"<string>"
]
},
"answers": [
{
"id": "<string>",
"url": "<string>",
"text": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"credential": "<string>"
},
"likes": 0,
"views": 0,
"shares": 0,
"comments": 0,
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
quora.question - Returns:
datahasquestion,answers. - Cost: 2 credits. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.quora.question({ question: "https://www.quora.com/What-is-the-best-way-to-learn-programming" });
console.log(result.data.question);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.quora.question(question="https://www.quora.com/What-is-the-best-way-to-learn-programming")
print(result["data"]["question"])
curl -X POST https://api.stophy.dev/v1/quora/question \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"question":"https://www.quora.com/What-is-the-best-way-to-learn-programming"}'
stophy quora question https://www.quora.com/What-is-the-best-way-to-learn-programming
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json