3

I am not finding a way to return a list of new questions by tag with the new Stack Exchange API.

Am I missing something or is this not available? If this is not available, I most certainly request this feature.

2
  • Do you want something like "the most recent 10 questions with a certain tag?" Commented Feb 12, 2012 at 4:20
  • Yes, I want precisely that. Commented Feb 12, 2012 at 7:25

1 Answer 1

5

There are 2 ways to get the 10 most recent questions of a tag, either on the /questions method or /search method.

The parameters on both routes are the same, just set tagged to your tag (eg iphone), and sort to creation, and order to desc

So that's either:

https://api.stackexchange.com/2.0/questions?order=desc&sort=creation&tagged=iphone&site=stackoverflow

or

https://api.stackexchange.com/2.0/search?order=desc&sort=creation&tagged=iphone&site=stackoverflow

The difference between the two is that if you search with multiple tags (separated by semi-colons), eg (c#;iphone):

  • The /questions method will return questions which have both the c# and iphone tags.
  • Whereas the /search method will return questions tagged either c# or iphone (or both).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.