Take the 2-minute tour ×

I am playing with the open data project at spogo.co.uk (sport england).

See here for a search example: https://spogo.co.uk/search#all/Football Pitch/near-london/range-5.

I have been using cygwin and curl to POST JSON data to the MVC controller. An example is below:

curl -i -X POST -k -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" https://spogo.co.uk/search/all.json --data '{"searchString":"","address":    {"latitude":55,"longitude":-3},"page":0}'


  1. How can I find out what other variables can be included in the post data?
  2. How can I return all results, rather than just 20 at a time? Cycling through page numbers doesn't deliver all at once.
share|improve this question
add comment

1 Answer

AJAX is simply a technique of posting data over a connection asynchronously, JSON is just a string format that can contain data. Neither of which have built in mechanisms for querying information such as what fields are accepted or the amount of data returned.

You will want to check the web service documentation for on spogo.co.uk for these answers, IF their web service exposes such functionality they will be the final authority on what the commands and formats are.

share|improve this answer
thanks, is there anyway I could find out how to return all the results at once? –  user1950288 Jan 5 '13 at 18:20
spogo.co.uk/developer-area. AJAX and JSON do not expose any particular content functionality. You will need to refer to your service's documentation and support channels. –  user1931103 Jan 5 '13 at 18:23
I think this has already been answered for you. The spogo.co.uk documentation will tell you whether there is a parameter you can include for controlling the number of results returned. Usually it's something like "limit". –  travega Jan 5 '13 at 18:28
@travega thanks, but there isn't any documentation! –  user1950288 Jan 5 '13 at 18:45
Hmm yes their documentation is a little thin :( The parameter name "limit" would be very common if not an unspoken best practice for paginated search naming convention. Usually it is not a good practice to try grab all data at once as for large result sets the request could hang for a long time or timeout. Retrieving results page by page is generally better practice. However, you could try adding the limit parameter eg. limit:50. If that doesn't work the you could try contacting ashley scott at spogo (ashleyscott@spogo.co.uk) –  travega Jan 5 '13 at 19:01
add comment

Your Answer


