API endpoints for searching threads/posts

TimeWizardCosmo

Well-known member
I'd like to be able to query an API endpoint or two and get back a list of threads and posts as would be returned by the default search functionality. Thread and post objects should formatted like they're provided when querying those directly and some control over results per page would be helpful.

Any estimates? Shoot me a PM with your offer (but I maybe be slow to reply as we're in the middle of moving).

Thanks!
 
These are already available in the default XF API, why you need a custom development for this ?


Or you need something custom in that ?
 
I've looked through that, but there doesn't appear to be a way to get a list of threads or posts by "keyword" search. You can get a list of threads from a forum, or get posts from a specified thread ID, but I don't see anything about searching other than using "Search Forums", which aren't what I'm trying to do.

I'd like to be able to send an arbitrary query for something like "john f kennedy" and get back a list of threads and posts that would otherwise show up on the search page.

Found these:

Maybe I'm missing something?
 
was anyone able to figure out how to get search on the @truonglv API working? the other endpoints all work but this one seems to be invalid?

I'm not sure if it has to do with the same reason that the XF native API that is documented also returns invalid endpoint or not
 
You don't need an Add-on, the built-in API has endpoints for searching.


Post your search to this endpoint and it will return a Search object.

Use search_id from this object to get the results from https://xenforo.com/community/pages/api-endpoints/#route_get_search_id_

Thanks for the reply @Kirby but the problem is that the /search endpoint returns an invalid route error.
 
Yep, you are right (as of now).

This seems a bit of a bummer to me as there is in fact no code to handle those endpoint URLs.

I've reported this as a bug:
 
Back
Top Bottom