Connecting to StackExchange
StackExchange does not strictly require authentication. However, if you would like to increase the number of requests you are allowed, you can use token authentication.
Using Token Authentication
In order to authenticate to StackExcange, register an application on StackApps. Once your app is registered, you can then set the APIKey profile setting to the API Key that you receive.
By default, the driver will query the StackOverflow site. You can change this by setting the Site profile setting to the site you wish to connect to. You can view a list of all valid sites by querying the Sites table.
Example Connection string
Profile=C:\profiles\StackExchange.apip;ProfileSettings='Site=academia;APIKey=my_api_key;'
Rate Limiting
StackExchange will limit the number of requests you can make to the server. By default, the driver will page through results until a rate limit is hit. Each application connecting has a daily request limit of 10,000 requests. For this reason we recommend utilizing supported server-side filters when querying data. For example:
SELECT * FROM Answers WHERE QuestionId = '1234'
To view the filters supported by the server, navigate to the documentation page on the table you are querying.
Connection Properties
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.
Property | Description |
APIKey | Your StackApps request key. Use this to get more requests per day. |
Site | The Stack Exchange site you wish to query against. |