How to get a list of questions from stackoverflow API based on search query?

后端 未结 2 1644
栀梦
栀梦 2021-01-04 22:19

I am interested in the getting a list of the question based on a tag or a search query. I will give you an example.

So If I use the search keyword as \"ipv4\", it sh

2条回答
  •  一个人的身影
    2021-01-04 22:52

    Stackexchange offers https://api.stackexchange.com/docs/advanced-search endpoint.

    So for example, get on https://api.stackexchange.com/search/advanced?site=stackoverflow.com&q=firebase would return you something like this:

    This is simplest example but as you will find in the docs, there are numerous parameters based on which search can be performed. Some of them are:

    • accepted - true to return only questions with accepted answers, false to return only those without. Omit to elide constraint.
    • answers - the minimum number of answers returned questions must have.
    • body - text which must appear in returned questions' bodies.
    • tagged - a semicolon delimited list of tags, of which at least one will be present on all returned questions.
    • title - text which must appear in returned questions' titles.
    • user - the id of the user who must own the questions returned.
    • ...

    Hope this helps!

    Cheers!

提交回复
热议问题