Web Question Answering API

WebQA API allows asking natural language questions over any given set of websites.
It is capable of answering any natural language questions over any websites indexed by search engines.
The resulting answer is supplemented with links to the sources used to generate said answer.

Supported languages

Currently, WebQA API supports the following languages:

  • English
  • German
  • Russian
  • Chinese
  • Dutch
  • French
  • Italian
  • Japanese
  • Portuguese
  • Spanish

Please contact us if you want to use it with any other language.

Requesting answers from WebQA API

Using CURL

curl https://databorg.ai/api/webqa \
  -H 'Authorization:"Bearer YOUR_KEY"' \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"question":"How tall is Everest?", "urls": ["https://en.wikipedia.org"]}'

Using javascript

const url = 'https://databorg.ai/api/webqa';
const apiKey = 'YOUR_KEY';
const question = 'How tall is Everest?';
const urls = ['https://en.wikipedia.org'];

const result = await fetch(url, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ question, urls }),
}).then((r) => r.json());

console.log(result);

Using python

import requests
import json

url = 'https://databorg.ai/api/webqa'
apiKey = 'YOUR_KEY'
question = 'How tall is Everest?'
urls = ['https://en.wikipedia.org']

result = requests.post(url, data=json.dumps({"question": question, "urls": urls}), headers={
  "Authorization": "Bearer " + apiKey,
  "Content-Type": "application/json",
})

print(result.content)

Example response

Example response:
{
  "result": "Mount Everest's official height is 8,848.86 meters (29,031.7 feet). There was an argument between China and Nepal as to whether the official height should be the rock height (8,844 m, China) or the snow height (8,848 m, Nepal), but both sides agreed on the current height in 2010. Other nearby peaks include Lhotse, Nuptse, and Changtse. Mauna Kea in Hawaii and Denali in Alaska are sometimes claimed to be the \"tallest mountains on Earth\" when measured from their base, but not when measured from sea level. 

Sources:
-https://en.wikipedia.org/wiki/Mount_Everest
-https://en.wikipedia.org/wiki/Mount_Everest#Comparisons
-https://en.wikipedia.org/wiki/Mount_Everest#Context_and_maps"
}