1

I've looked at the API docs.

However, I haven't found a way to do complex queries through the API such as I can do in the Stack Exchange Data Explorer query editor (select, joins etc).

Example: data.stackexchange.com/stackoverflow/query/edit/970881

Is there a query API available or how can I achieve this otherwise?

1

No there is no "Query API", especially not for SQL-like syntax.

It sure would be sweet to have an always current version of SEDE (even if limited to, say, a hundred rows), but this is very unlikely to ever be provided.

Your options are:

  1. Oftentimes the q parameter of the /search/advanced route is pretty powerful and will get you close to what you want.

  2. If the data is slow changing (like the sample query you linked), just fetch it from SEDE using the "Download CSV" option. For example:
    data.stackexchange.com/stackoverflow/csv/1205610

  3. Otherwise, you must download all the data via the API and then perform whatever operations are needed to get the results you want.

For large and rapidly changing data, fetch the base from SEDE and/or heavily cache it, and then use the API to only fetch what's changed since the last cache or SEDE update. (Unfortunately, this is not always easy, as in the case of tag wikis.)



The Stack Exchange Data Explorer

  • Hi Brock, thanks for the reply! Question about option 2, the CSV data is cached right? I won't get new data in this csv/1205610/ link, would need to query again to get new results? – user3517546 Jan 29 at 18:37
  • @user3517546, it's not cached, per se. It's just that SEDE data is updated (only) once a week. YOU should heavily cache such slow-changing data anyway. – Brock Adams Jan 29 at 20:22

You must log in to answer this question.

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