Skip to main content
11 votes

What exactly is a valid OAuth domain name for registering your app?

The OAuth Domain is either: A valid domain that you own and control, and that is hosted somewhere the client can reach. Say, for example that you owned unicorns.mil. See this answer and this answer ...
Brock Adams's user avatar
10 votes
Accepted

How can I quickly get an access token for personal use?

It's possible to authenticate yourself via the command line; there's no need to set up a website or so. Open the application page via https://stackapps.com/apps/oauth and make sure the option 'Enable ...
Glorfindel's user avatar
  • 6,965
9 votes
Accepted

Can the redirect_uri contain port number?

You got that error because you set the OAuth Domain like example.com:8080, not the redirect_uri. That's not how you configure non-standard ports; see below. The redirect uri, with port, feature now ...
Brock Adams's user avatar
6 votes

Stack Overflow for Teams support

Unfortunately, the Free Tier Stack Overflow Team does not have access to APIs. You will not be able to create a PAT if you only have a Free Tier Team assigned to your account.
Deanna Irizarry-Fields's user avatar
5 votes

Please "release" and/or document API version 2.3

Note that version 2.3 has been around since at least Aug 28, 2015 (Date of that answer). I could have sworn that one of the SE guys said they weren't going to document it, but can't find a reference ...
Brock Adams's user avatar
5 votes
Accepted

Is the StackExchange API free of charge?

It is completely and unconditionally free. (Although there are usage limits, which are described here.) It is not even necessary to create an account in order to use it. (Although an account is ...
Cody Gray's user avatar
  • 265
4 votes

How can I extract user information on Stack Overflow using Python and the Stack Overflow API?

The API presents individual features behind individual URLs. The information on the profile page is combined from several sources; to get the details you requested, you will have to submit multiple ...
tripleee's user avatar
  • 167
4 votes

What is the right way to create a Stack Exchange API filter?

I have struggled with Stack Exchange API filters too, when I tried to incorporate up_vote_count, down_vote_count and view_count attributes in my user response object. I visited this page of the ...
André Gasser's user avatar
4 votes
Accepted

Is there an easy way to get user reputation via API?

The question is not clear. If you just want a user's reputation merely do a GET of the API /users/{ids} route. Like so:   api.stackexchange.com/2.2/users/3528590?site=stackoverflow&filter=!...
Brock Adams's user avatar
4 votes

503 errors on batch get questions endpoint

So, you are making up to 150 requests in a 30 second period (10 "parallel requests", with a 2 second pause in between). And failing at 80 to 100+ seconds of operation and 400 to 500 total ...
4 votes

Creating personal applications using Stack Overflow/Stack Exchange API

If you need something for personal use, it doesn't really matter. You can even use example.com, as long as the site doesn't redirect and change the URL. You'll need a browser and a tool like curl. ...
Glorfindel's user avatar
  • 6,965
4 votes

What is the latest version of the Stack Exchange API?

The documentation always refers to the latest official version.  At the time of posting, that is version 2.3. See also: Please "release" and/or document API version 2.3 API 2.3 Release
rene's user avatar
  • 2,897
4 votes

How can I implement a method to call the SE API that handles backoff correctly?

I think a simple singleton that keeps track of the backoff should be enough. I assume you do use the fetch API or any other async capable module. But the approach is also feasible with just Promises ...
rene's user avatar
  • 2,897
4 votes
Accepted

Getting a "Forbidden" response when calling the API from code, but not when using the exact same URL in a browser

The C# HttpClient doesn't add a User-Agent header by default. The CDN provider (Cloudflare in this case) checks for the presence of a User-Agent header to distinguish somewhat between regular browsers ...
3 votes
Accepted

My filter is not returning any results. How to create a minimal filter?

The key mistake here is neglecting the Wrapper Object, and this is a big flaw with the filter documentation. The wrapper is the box that everything you get from the API comes in. You always get the ...
Brock Adams's user avatar
3 votes
Accepted

Can we find the time of a vote using the API?

Obviously, vote time data is sensitive and censored to protect voter anonymity. So, scanning the list of available objects in the API, we see that: A user's downvote times can be obtained via the /...
Brock Adams's user avatar
3 votes

How to get a list of all StackExchange employees?

Updated thanks to comments by Brock Adams and user43888. There are two methods to achieve this: Method 1: inefficient, but future-proof as it only depends on the SE API. Query the SE API for all ...
Gaurang Tandon's user avatar
3 votes
Accepted

Cannot get redirect_uri to work

There have been no reported changes to the API, officially for many years, (unofficially since January). But, frankly that script's approach should have never worked. OAuth credentials are sent to: &...
Brock Adams's user avatar
3 votes

How to query the Stack Exchange API using an OR operator?

The API currently does not support this, but then neither does the website itself. The "How do I search?" help page says: OR operator To combine results from multiple tags, separate the tag ...
Brock Adams's user avatar
3 votes

Can I fetch Stack Overflow users by location in Stack Exchange API

It's not possible (short of fetching all users and filtering yourself). The API simply does not offer that query. For alternatives, see the Data Explorer (SEDE): https://meta.stackexchange.com/q/...
Glorfindel's user avatar
  • 6,965
3 votes
Accepted

Suggested edit not returned by API

It's probably because the referenced post has been deleted. The API excludes (most) deleted data (usually).
Brock Adams's user avatar
3 votes
Accepted

Is there any way or script to sort questions/posts/answers with custom criteria?

You can filter (not sort) questions (and to some extent answers) by using the /search/advanced route of the API. The q parameter allows most of the Advanced Search Options. For example, this will ...
Brock Adams's user avatar
3 votes

API stopped allowing CORS requests

The bug has been fixed: Thanks for reporting. We're working on porting our websites to ASP.NET Core, and those errors you've seen were a result of this. We caught the first error ourselves on a ...
double-beep's user avatar
3 votes

Getting the ID of the question-asker when fetching new answers from the API

No; the answer object doesn't contain any information about the question except the question ID. I'm not sure how you obtain the answer IDs, but you could investigate if it's possible to look for ...
Glorfindel's user avatar
  • 6,965
3 votes

How can I retrieve the reputation I (or another user, fwiw) earned for a given tag from questions and answers?

It is easier to use the /users/{id}/top-tags (JSON) endpoint for a single user. That will give you for a given user all their tags with score and count for question and answers. Don't let the "...
rene's user avatar
  • 2,897
3 votes
Accepted

How do I see the differences between two or more SE API filters and merge into a filter which includes all requested properties (i.e. is a superset)?

To make it easier to merge filters, I wrote the following snippet. The detailed differences between each two filter combinations are a bit unwieldy to display in the snippet space, so they are output ...
Makyen's user avatar
  • 1,676
3 votes
Accepted

When using the Advanced Search API endpoint, how soon after the edit grace period is question data updated?

tl;dr: I think you can reduce the delay to 8-10 minutes. Grace period edits are available for 5 minutes after post creation and search results can be stale for a few minutes afterwards, especially ...
Adam Lear's user avatar
  • 358
3 votes

Is there any way to get statistics by tag?

At this point our API only offers the following reading capabilities around tags: (https://api.stackexchange.com/docs) Unfortunately, the Dashboard can't be filtered to Tags.
Hannah Schepers's user avatar
3 votes

Fetch all questions of a particular tag from the Stack Exchange API in Python

The first thing to point out is that you should understand that fetching all posts with a tag is going to result in huge quota usage for any relatively popular tag , as well as take a significant ...
0Valt's user avatar
  • 1,454
3 votes
Accepted

How do I search answer bodies for Markdown links?

The search methods work on the HTML version of the post, so searching for Markdown won't work. You can either use this parameter url - a url which must be contained in a post, may include a wildcard. ...
Glorfindel's user avatar
  • 6,965

Only top scored, non community-wiki answers of a minimum length are eligible