3

All of the API docs I've seen are just for getting metadata, stuff like "how many comments".

Is there an API to ask questions?

eg here: I can't see a way to add a query string: https://api.stackexchange.com/docs/answers

there is some q param:

q - a free form text parameter, will match all question properties based on an undocumented algorithm.

/2.2/search/advanced?order=desc&sort=activity&q=is bitcoin anonymous&site=stackoverflow

I did try a test question using that, but the results are all over the place and don't even mention the search terms in many places.

Update: possibly it's just the API uses an old search algorithm, different from the site.

How do you trigger the search/advanced 'q' parameter to search all words?

Then I need to combine with these fields, and add ++ to terms to force a boolean include.

  • q - a free form text parameter, will match all question properties based on an undocumented algorithm.
  • body - text which must appear in returned questions' bodies.
  • title - text which must appear in returned questions' titles.

1 Answer 1

1

Is there an API to ask questions?

If you mean creating a new question, yes: https://api.stackexchange.com/docs/create-question. You do need an access token with write access.

Does the stackapps API allow queries of question to get answers?

That looks more like you're searching for the answers to a single question: this is possible as well, either with https://api.stackexchange.com/docs/answers-on-questions or (with the appropriate filter) with https://api.stackexchange.com/docs/questions-by-ids.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .