Questions API

in

API documentation > Questions API

The Questions API returns the questions asked online for a keyword. Alternatively, it can find questions asked from a specific forum, or subreddit.

Access to this API is paid, and is separate than the regular Articles API.

Question Search

This endpoint is used to retrieve a list of questions that match a specific search term (keyword). Alternatively you can search for questions from a specific forum (ie bodybuilding.com), or subreddit (ie askreddit).

Resource URL

GET http://questions-api.buzzsumo.com/search/relevant_questions.json

Parameters

1) q (required) This is either a keyword, a domain name (forum), or subreddit.

Example Value 1: content marketing (returns questions related to content marketing)
Example Value 2: “gluten free” (returns questions that has “gluten free” in the question, in that specific order)
Example Value 3: paleo -keto (returns questions related to paleo BUT not keto)
Example Value 4: paleo OR bodybuilding (returns questions related to paleo OR bodybuilding)
Example Value 5: source:bodybuilding.com (returns questions from the bodybuilding.com forums)
Example Value 6: subreddit:bitcoin (returns questions from the /r/bitcoin subreddit)

Exa

2) begin_date (optional) The begin date, in Unix epoch time.

Example Value: 1474553614

3) end_date (optional) The end date, in Unix epoch time.

Example Value: 1506089690

4) num_days (optional) If begin_date, or end_date is not specified, you can pass in num_days, which will return questions asked in the past num_days days. If begin_date, end_date, or num_days is not passed, we will retrieve questions from all-time.

Example Value: 14

5) case_sensitive (optional) true if the search should be case_sensitive. Default: false

Example Value: true

6) sources (optional) Comma separated values of domains to retrieve questions from.

Example Value: healthboards.com,bodybuilding.com

7) exclude_sources (optional) Comma separated values of domains to ignore questions from. If “sources” is specified, this field is ignored. Likewise, if this field is specified, “sources” is ignored.

Example Value: healthboards.com,reddit.com

8) question_types (optional) Comma separated values of question types to retrieve
Default: ecommerce,forums,qa,reddit

ecommerce: questions from Amazon and ecommerce sites like Walmart.
forums: questions from online forums like healthboards.com
qa: questions from Q&A communities like Quora, StackExchange and Yahoo Answers
reddit: questions from Reddit

Example Value: ecommerce,forums

9) sort (optional) Sort questions by this field. Available values: relevancy, date. If sort=date, it will be sorted by most recent first. Default: relevancy

Example Value: date

10) page (optional) Page number, starting from 1. Defaults to 1
page * size can not > 100,000. In other words, we will never be able to return results past the 100,000th result. Otherwise, we will return an error back.

Example Value: 1

11) tld (optional) The TLD of domains to retrieve questions from. For example if tld=uk, we will return questions from sites that end in .uk (such as amazon.co.uk)

Example Value: uk

12) size (optional) The number of questions to return. Max: 50

Example Value: 10

Example Request

GET https://questions-api.buzzsumo.com/search/relevant_questions.json?q=paleo&size=2&api_key=API_KEY

Example Response

{  
   "results":[  
      {  
         "id":876141915,
         "question_text":"What are the best low carb, high protein sources for a paleo, keto vegan diet?",
         "url":"https://www.reddit.com/r/veganketo/comments/71ezv9/what_are_the_best_low_carb_high_protein_sources/",
         "question_date":1505948604
      },
      {  
         "id":875914228,
         "question_text":"Spearmint Tea/Capsules for Excess Hair Growth??? Advice and experience? Also anybody Paleo for their PCOS symptoms?",
         "url":"https://www.reddit.com/r/PCOS/comments/71ase9/spearmint_teacapsules_for_excess_hair_growth/",
         "question_date":1505911261
      }
   ],
   "total":8304,
   "num_pages":4152,
   "error_code":0
}

Response Fields

results This is a list of questions. Each question has an id, question_text, url, and question_date (the date in Unix epoch time the question was asked)

total This is the total number of questions found

num_pages Number of pages returned (each page containing at most size results)

error_code You can ignore this field as it is used only by our web app (UI)

0