Questions tagged [api]
Questions about the Stack Exchange API *only*. If your question concerns any other API, do not use this tag. For bugs, please (also) use the version tag, EG [api-v2.2], that the bug applies to.
454 questions
5
votes
0
answers
572
views
Platforms Supported by the API and Response Compression
What platforms are supported for use with the Stack Exchange API?
In short, anything that can make a GET request to the API servers and supports JSON/JSONP & GZIP. (JavaScript, Python, PHP, Java, ...
3
votes
2
answers
491
views
What is the correct way to get the stackoverflow.com URL for an answer via the API?
A while ago I made a little "Recently answered on Stack Overflow" sidebar widget for my homepage. Currently this works by filtering answers out of the user feed however I thought I'd update it to make ...
2
votes
1
answer
147
views
Can I change my profile picture using the API version 2?
I was considering making an app that lets the user design a profile picture and then activate it on the user's Stack Exchange account. Could a feature to change the profile picture be added to the ...
3
votes
1
answer
80
views
How do I get the total number of records for a given search?
I want to use the Stack Exchange API and get the total number of results returned from the search route.
I wrote this recursive script to find the last page with the has_more=False, is there a better ...
2
votes
1
answer
892
views
Any guarantees on JSON string encoding?
According to the JSON specification, JSON can be returned in one of five string encodings:
UTF-8 (the default encoding)
UTF-16 Little Endian
UTF-16 Big Endian
UTF-32 Little Endian
UTF-32 Big Endian
...
1
vote
1
answer
116
views
Why is the `site` parameter required in `/me` call?
I want to query information about the logged-in user using me, and this site parameter is creating some small problems.
I am developing a visual studio extension where upon logging in a user will get ...
0
votes
1
answer
632
views
400 Error when attempting to retrieve authenticated user data
I am attempting to use the /me API to retrieve an authenticated user's details but I am receiving a 400 error.
I am able to complete the OAuth2 dance and have been able to capture the access token ...
3
votes
1
answer
156
views
Questions with specific tag and specific text inside questions
So I am able to get questions with specific tags, but still not able to get questions which have specific text and a specific tag.
For example if I want to get all the questions with text "api" in ...
2
votes
0
answers
322
views
Array boolean values are returning empty
I am trying to convert a JSON array to a PHP array, and the boolean values are being lost. I think I need to loop round using foreach() and cast the items as they are placed in to the new array, but I ...
1
vote
1
answer
137
views
How to get all questions with a specific tag between certain dates
I would like to get all questions created and tagged with tag "R" between 2 dates.
I'm using parameters: tagged = R, sort = creation, fromdate and todate set to appropriate dates and site = ...
2
votes
2
answers
141
views
Total Number Of Answers
I need to find the total number of answers submitted by a user on stackoverflow. I tried the following:
I got my json from the following:
https://api.stackexchange.com/users/2440312/answers?site=...
4
votes
1
answer
136
views
What's the difference between the Stack Exchange API and the Stack Overflow API?
I heard about the Stack Overflow API. Is there a Stack Overflow API available. Or is it the same as the Stack Exchange API?
3
votes
1
answer
148
views
Help with javascript SDK configuration
The following problem is REAL! All names have been changed to protect the innocent.
I have a site at "http://Something.github.io/MyRepository/Directory/index.html"
And I have my app configured like ...
1
vote
1
answer
154
views
I want a python program example for more requests a day
How can I make about 10k requests on
https://api.stackexchange.com/2.2/users/+J+/questions?order=desc&sort=activity&site=stackoverflow
using python program in a day. Where J is variable and ...
2
votes
1
answer
127
views
Get users based on location? [duplicate]
I want to get site users by their location but I don't see any method for that.
And it's not possible with a filter either.
Is there any way to get users based on location or is it not possible?
3
votes
1
answer
80
views
Can I retrieve question comment count as part of a search query?
I'm looking for a comment_count property in the results of /search/advanced to get a count of comments under a question.
Is there an undocumented q for /search/advanced that gives a comment_count ...
4
votes
0
answers
124
views
How to quickly retag a question from the API?
I'm playing with the write API, and I'd like to simply retag a question. This is the code I have so far:
$editURL = 'https://api.stackexchange.com/2.2/questions/' . $question->{"question_id"} . '/...
-2
votes
1
answer
82
views
Are the inbox routes (`inbox_item`) missing some item types?
Should there be more options for item_type in the "inbox" routes (they return inbox_item)?
Shouldn't they return answer and edit suggested like the site's global inbox does? As shown in this ...
4
votes
1
answer
112
views
Getting historical data for careers?
I'm wondering if there is a possible way to get historical data regarding job postings made through careers, even for postings that have already been filled. Does careers keep this data at all, and if ...
1
vote
1
answer
119
views
Absence of `order` and `sort` in rest calls?
Will absence of order and sort give the same result as order=desc and sort=activity always in every call (it is default in every call)?
5
votes
1
answer
97
views
Which reputation events are private?
I've been reading the API documentation on retrieving a user's reputation history (docs/types/reputation-history)
and Stack Overflow's description of how reputation is calculated.
But, I can't find ...
4
votes
0
answers
625
views
What should I put in redirect_uri for implicit OAuth 2.0
From the document I can't figure out what value should I put in redirect_uri if I want to implement iPhone app. I try https://stackexchange.com/oauth/login_success but it not work and show this error
...
0
votes
1
answer
287
views
Post to Stackoverflow
Is it possible to post a question to Stack Overflow using PHP in the same way that it's possible to post content to Facebook?
5
votes
1
answer
237
views
Provide a streaming API instead of forcing API users to poll
I've written an IRC bot that can notify channels when new questions with a certain tag are posted. However, currently I'm polling the URL #{APIURL}questions?pagesize=100&fromdate=#{@...
-4
votes
1
answer
136
views
I Cannot Perform Oauth [closed]
My Clientn id = 4784
and Key = cB0l6XiaOW5l5vsBnBeIUg((.
What do I do for Oauth and to get an access token?
3
votes
1
answer
130
views
Question's body rendering in Android's webview
I've developed an app that get questions from Stack using REST APIs and shows them in a WebView. My problem now is that the body often contains placeholders that must be "replaced" with the real ...
21
votes
1
answer
268
views
Can we have some debug endpoints for testing corner cases?
After encountering a throttle violation today (which I posted in another question), it occurred to me that although I've put together code to handle "backoff" conditions, and potentially throttle ...
1
vote
1
answer
661
views
How can I use the Stack Exchange API to get the total score on answers to questions with a specific tag?
I want to use the API to get the sum of all scores of my answers to questions having a specific tag.
I started using top-user-answers-in-tags method, but it only returns the top 30, whereas I want ...
3
votes
2
answers
300
views
Is there an api to post questions without using the websites interface?
I wanted to post questions after a proper user authentication explained here. Is there anyway I can do this?
3
votes
0
answers
189
views
What's the proper way to fetch the score of all answers of SO?
I wrote a small program querying the SE API to grab the public scoring data of all SO answers (excluding the last 3 days).
Basically the request I do gets me this:
Questions[]:
Id
Title
...
2
votes
1
answer
75
views
Reputation losses aren't reflected in the API
This includes reputation recalculations (e.g., the latest) and (speculative) when people take upvote back.
First case you can see on standard stackauth/users query: it displays meta reputation before ...
3
votes
0
answers
97
views
SE API V1.1 documentation, date errata
The Stack Exchange API, version 1.1, documentation is ever so slightly confusing wherever Unix timestamps are mentioned (perhaps any ranges, I haven't dug too deeply)
For instance:
todate – Unix ...
2
votes
1
answer
262
views
Why am I getting a 404 when trying to post a comment?
I'm dabbling around in /posts/{id}/comments/add, and I'm trying this query:
https://api.stackexchange.com/2.1/posts/144890/comments/add?site=meta.stackoverflow&key=ArbQthisismykeyjyecuJQ((&...
5
votes
1
answer
101
views
Possible to get a user's flag history?
Is it possible to retrieve a signed-in user's flagging history, preferably with the status of the flag?
I looked at the /me/timeline docs, and noticed it doesn't return flags. Is this type of ...
3
votes
1
answer
71
views
Some blank properties missing
I am using /me/associated. I haven't posted any question in one account, so the response comes as:
"top_questions": [],
"top_answers": [],
"question_count": 0,
"answer_count": 0,
in the same browser ...
4
votes
1
answer
138
views
Is there an RSS feed or question that has API changes?
Is there someplace that we can find notifications of API changes? I noticed today that a new property has been added to user along with a couple new method (and maybe other changes).
Is there an ...
2
votes
1
answer
276
views
C# Stackexchange Questions API [duplicate]
I need to build an web application C# and below is what I'm stuck with
Can I use Stack Exchange's API with Key? Do they have a "hello world" key can be used for learning purpose.
I wish to get the ...
3
votes
1
answer
71
views
Reputation_change has the historical total rather than the daily delta?
I'm trying to use the reputation API to get the recent reputation delta for a given user. For example, looking at recent entries for /2.2/users/21539/reputation, one has:
{
on_date: 1447018487,
...
2
votes
3
answers
367
views
Can there be a way to find a user given his email hash?
Given a user's email, it would be great if we could hash it and search for that user with it.
The reason for this is suppose:
Someone has a website
On that website, they invite SO users to enter ...
4
votes
1
answer
104
views
How to monitor (for new) accepted answers by certain tags?
In practice, I don't know the IDs of the questions, but I can search for answers by given tag(s).
The problem is how to find (newly) accepted answers. The "activity time" does not work for this.
For ...
2
votes
1
answer
81
views
Where is "items" & "badge_counts" documentation?
Where is the items & badge_counts documentation?
This is returned as JSON. I am using the /me/associated query function.
4
votes
2
answers
326
views
Why does the API lack any POST methods?
Why aren't any POST methods available?
Being able to post new questions and answers would be very interesting.
3
votes
1
answer
94
views
How to get the 10 most recent questions with accepted answers based on a given tag?
I am trying to figure out how to get the 10 most recent questions from the Stack Overflow site, that have been answered, based on a given tag (such as 'Java').
I looked at the documentation but I ...
4
votes
1
answer
116
views
Can revisions be returned from the API, filtered by user?
I see that question or answer revisions can be returned from the API either by post ID or by GUID.
I'd like to obtain this data filtered by user, e.g. "all revisions made by user X". However, I ...
4
votes
1
answer
368
views
Strange encoding for JSON output
I'm trying to create an R API. Here's some basic code for processing JSON:
library(rjson)
fromJSON(readLines("http://api.stackoverflow.com/0.9/stats/", warn=F))
As I look into this, the output of ...
4
votes
1
answer
308
views
How do I parse the dates from the API?
I see that JSON returned by the API contains dates in the following format:
"creation_date":1364546475
^^^^^^^^^^
What's the meaning of it? How can I parse it to get the date in the ...
2
votes
1
answer
86
views
Why is `page` and `page_size` returned in common wrapper object?
page and page_size returned in common wrapper object, if I run /me/associated request. Why is it so? I am asking this because we have already sent these parameters as request. So getting the same ...
13
votes
0
answers
199
views
Are there plans to involve Area51 in SE API version 3?
Several applications come to mind, proposal publicity, question analysis, making resources files, but I can't find any SE API calls that can do this.
1
vote
1
answer
64
views
`types=main_site` in `/me/associated` gives `meta_site` accounts also
When I run /me/associated with main_site as a parameter in types, its gives meta_site accounts also (Meta Stack Exchange profile).
2
votes
1
answer
73
views
Advanced search doesn't return expected results when using min & max (dates) together?
I want to use the Advanced Search API to get the same results as the Stack Overflow site search.
With it, I can see new questions on 11/10/2015.
When I tried to craft a query using the Advanced ...