8

I have a Meteor application and I'm making API calls like:

var urlString = "http://api.stackexchange.com/2.2/users/"+surl; HTTP.call ("GET", urlString, {params:{site:"stackoverflow"}}, function (error,result) { console.log (result.data); } ); 


At present I'm getting quota-limited to 300 calls only.
But I want more than 300 and I have an application key.

How do I request, using the API key, so I can get 10,000 calls per day?

1 Answer 1

13

It's pretty simple, you just append your key to the URL as a parameter.
For example, looking for users 1 and 5:

http://api.stackexchange.com/2.2/users/1;5?site=stackoverflow&key=YOUR_KEY_HERE 


So, it looks like your HTTP.call would become:

HTTP.call ( "GET", urlString, {params:{site:"stackoverflow", key:"YOUR_KEY_HERE"}}, function (error,result) { console.log (result.data); } ); 
2
  • Thx for the answer,One issues is if the request we sent is bad, then in console it is showing bad request message(404), It is also displayinf the api_key in error message, how to overcome this. Commented May 22, 2014 at 3:12
  • 1
    It's unclear what you're asking, but it sounds like a new/different problem. Open a new question and give details. Commented May 22, 2014 at 4:04

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.